hi,
I think the way you invoke the targets is like:
ant -f buildFile.xml a b c
If that is the case, you are invoking each target independent of each
other - which means that the dependencies for each are discovered
separately and executed - once for a, once for b and once for c. If you
had a single target called 'all' or something that ties together a, b
and c, and you invoke that from the command line, then the dependency
tree will be determined once and init will be called once for each
invocation.
Does that make sense?
hth,
Vijay
Guy Catz wrote:
I have several targets, all depends on init -
<target name="a" depends="init">
...
<target name="b" depends="init">
...
<target name="c" depends="init">
...
and of course<target name="init">
...
Now, I also have a target which call a, then b and then c.
But when I run that ANT, the output is something like this -
running<init> - successful
running<a> - successful
running<init> - successful
running<b> - successful
running<init> - successful
running<c> - successful
which means that Init ran 3 times!! instead of only once.
I do I make it to run only once?
Please advise.
Thanks,
Guy.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]