ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Castrianni <>
Subject RE: Depends="init" problem
Date Mon, 16 Jun 2008 08:03:59 GMT
There are many ways to call ant targets.  If you stick with using the depends to get a target
called, then ant will never duplicate a target.  So to get a target to call a then b then
c but only run init once, just make this new "big" target depend on a,b,c and it will call
each of them in order first before big which will even before that first call init only one

<target name="big" depends="a,b,c"/>

So you should see:


Shawn Castrianni

-----Original Message-----
From: Guy Catz []
Sent: Monday, June 16, 2008 2:50 AM
Subject: Depends="init" problem

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.


This e-mail, including any attached files, may contain confidential and privileged information
for the sole use of the intended recipient.  Any review, use, distribution, or disclosure
by others is strictly prohibited.  If you are not the intended recipient (or authorized to
receive information for the intended recipient), please contact the sender by reply e-mail
and delete all copies of this message.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message