ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Am I being a dumbass - or is there an antcall bug?
Date Mon, 24 Jul 2006 22:37:26 GMT
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


<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 name="dependancy1" depends="run_once_target">
        <echo message="## running dependancy1"/>
    <target name="dependancy2" depends="run_once_target">
        <echo message="## running dependancy2"/>

    <target name="target1" depends="dependancy1, dependancy2">
        <echo message="## running target1"/>

    <target name="target2">
        <echo message="## running target2"/>
        <antcall target="dependancy1"/>
        <antcall target="dependancy2"/>

    <target name="target3" depends="run_once_target">
        <echo message="## running target3"/>
        <antcall target="dependancy1"/>
        <antcall target="dependancy2"/>

View raw message