Changes

Jump to: navigation, search

User:Minooz/RepoSyncProj/Ant

686 bytes added, 13:40, 14 October 2010
Tutorials
:It should be noted, however, that Ant's depends attribute only specifies the order in which targets should be executed - it does not affect whether the target that specifies the dependency(s) gets executed if the dependent target(s) did not (need to) run.
 
:the if and unless attributes only enable or disable the target to which they are attached. They do not control whether or not targets that a conditional target depends upon get executed. In fact, they do not even get evaluated until the target is about to be executed, and all its predecessors have already run.
<source lang=java>
<target name="myTarget" depends="myTarget.check" if="myTarget.run">
<echo>Files foo.txt and bar.txt are present.</echo>
</target>
 
 
<target name="myTarget.check">
<condition property="myTarget.run">
<and>
<available file="foo.txt"/>
<available file="bar.txt"/>
</and>
</condition>
</target>
</source>
==Some Tips to remember==
:In Cygwin in the ''build'' folder. Just typing <code>ant</code>, will build the default target of the project. But typing <code>ant assign1.test</code> for example, will start from mentioned target.
:Also, option -f will build any files that's not named ''build.xml'' e.g. <code>ant -f buildHudson.xml</code>
1
edit

Navigation menu