ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <ddevie...@gmail.com>
Subject Re: Are multiple targets run in order, or in parallel?
Date Mon, 08 Aug 2011 17:03:18 GMT
On Mon, Aug 8, 2011 at 10:59 AM, Echlin, Robert
<Robert.Echlin@windriver.com> wrote:
>   "ant target1 target2 target3"
> Will target1 be guaranteed to be complete before target2 is run?

Yes, with two "but"s:
1) If you use the default executor. If you don't know what an executor
is, you most likely are :)
2) If target1 declared a dependency on target2 or target3, directly or
not, they could execute in a different order.

Note running "ant t1 t2 t3" is almost equivalent to running "ant t1",
"ant t2", "ant t3", in the sense that the dependencies of t1 are
executed before t1 itself, then the dependencies of t2 before t2, *as
if* t1 hasn't been run before (modulo properties/references set by
t1), which means that some dependent targets (e.g. init) may execute
several times (unless "protected" from multiple executions by a
property). So if target1 depends on target2, order of execution would
be target2 (from the target1 dependency), target1, target2 (from the
explicit cli invocation), target3. At least that's how I recall this
works, but you should double-check it yourself. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message