ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conor MacNeill <>
Subject Re: target dependencies
Date Wed, 18 May 2005 00:47:47 GMT
Michael Cepek wrote:
> This doesn't seem right to me.

Well, right or wrong, that is the way Ant has worked since the start and 
it will not be changed now. The paragraph you are quoting is about the 
dependencies in a single Ant target evaluation. So if Laurie had a target

<target name="target3" depends="target1, target2"/>

and he executes

ant target3

then init will only be run once. IOW,

ant target1 target2

is not the same beast. It says evaluate target1 and then evaluate target2.

There are probably arguments for both behaviours. With Ant, you can do 
something like this

ant build clean

and be sure the clean is the last target evaluated even if build or one 
of its dependencies depends on "clean"

> The "Using Ant" chapter of the "Ant User Manual" has always seemed
> pretty clear on the subject:
>    "In a chain of dependencies stretching back from
>     a given target [...] each target gets executed
>     only once, even when more than one target
>     depends on it."
> See text paragraph five of:
> So shouldn't Laurie's "init" target only be executed once (without
> having to fiddle with mysterious undocumented Ant settings)?!?!?


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

View raw message