You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ni...@ubs.com on 2006/07/25 00:37:26 UTC
Am I being a dumbass - or is there an antcall bug?
I would expect that when calling all targets below (target1, target2 &
target3) the "run_once_target" would get called only... once.
However, its not so.
With "target2", it gets called twice.
Is that a bug?
Doesn't seem to matter if I set inheritall="true" or not....
ant -version
Apache Ant version 1.6.5 compiled on June 2 2005
-Nick
<project name="moo" default="target1">
<target name="run_once_target" unless="run_once_target.done">
<echo message="## running run_once_target"/>
<property name="run_once_target.done" value="true"/>
</target>
<target name="dependancy1" depends="run_once_target">
<echo message="## running dependancy1"/>
</target>
<target name="dependancy2" depends="run_once_target">
<echo message="## running dependancy2"/>
</target>
<target name="target1" depends="dependancy1, dependancy2">
<echo message="## running target1"/>
</target>
<target name="target2">
<echo message="## running target2"/>
<antcall target="dependancy1"/>
<antcall target="dependancy2"/>
</target>
<target name="target3" depends="run_once_target">
<echo message="## running target3"/>
<antcall target="dependancy1"/>
<antcall target="dependancy2"/>
</target>
</project>