You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by KC Baltz <KB...@responsenetworks.com> on 2000/08/11 15:51:20 UTC
How should multiple targets on the command line work?
I often run ant like this:
ant target1 target2 target3
What I've found is that this has the same effect as running
ant target1
ant target2
and target3
In other words, even if target1 and target2 depend on the same tasks, those
tasks still get run twice. I didn't see anything in the docs saying how
this should work, so this is not neccesarily a bug. I would just like the
speed improvement that comes with not reevaluating targets unneccesarily. I
would kind of like to see it work as a sort-of "ad-hoc dependency
definition". So specifying "target1 target2 target3" implies target2
depends on target1 and target3 depends on target2.
K.C.
Re: How should multiple targets on the command line work?
Posted by Peter Donald <do...@mad.scientist.com>.
Personally I like it working like that as I often go
ant clean main
for a complete rebuild.
if tou want to reduce duplicity it is best to add a target in build file - ie
<target name="t4" depends="t1,t2,t3" />
and just use
ant t4
that works great (and is what my main target in all my buildfiles does :P)
Cheers,
Pete
*------------------------------------------------------*
| "Nearly all men can stand adversity, but if you want |
| to test a man's character, give him power." |
| -Abraham Lincoln |
*------------------------------------------------------*