It's been a while since I've written an Ant build file, so I may be missing something obvious here... can anyone shine a light for me? I have targets that have common dependencies and if I try to run them in a single invocation Ant executes the common dependency repeatedly.

Here's an example:

$ cat build.xml
<project default="target2">
        <target name="init">
                <echo message="init"/>
    </target>

        <target name="target1" depends="init">
        <echo message="target1"/>
        </target>

        <target name="target2" depends="init">
        <echo message="target2"/>
        </target>
</project>

$ ant target1 target2
Buildfile: build.xml

init:
     [echo] init

target1:
     [echo] target1

init:
     [echo] init

target2:
     [echo] target2

BUILD SUCCESSFUL
Total time: 1 second
$


I was only expecting 'init' to be run once... that's the way I remember things working. Am I doing something wrong, or is Ant?


Thanks,

L.


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to