Jump to: navigation, search


686 bytes added, 14:40, 14 October 2010
: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="">
<echo>Files foo.txt and bar.txt are present.</echo>
<target name="myTarget.check">
<condition property="">
<available file="foo.txt"/>
<available file="bar.txt"/>
==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>

Navigation menu