ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Echlin, Robert" <Robert.Ech...@windriver.com>
Subject RE: Are multiple targets run in order, or in parallel?
Date Mon, 08 Aug 2011 17:33:30 GMT
Hi guys,
Thanks, Dominique, for the reminder about order of execution being dependent on dependencies.
I remember that about dependencies declared in a target.
I am surprised that there isn't a line in the "Running Ant" page referring to the targets
page if the same ordering information applies.

Responses:
No, I don't know what executors are.
Unrelated: Reading the "targets" docs page just now told me of a new feature called "extension
points", which sounds valuable.

In my situation:
- target 1 removes all files from the output folders
- target 2 generates link catalogs for the current document set
- target 3 builds the output (HTML, PDF, and Eclipse plugins) using the link catalogs

So at least the first one can't possibly depend on later ones directly. :-)
And it doesn't depend on anything, actually.
My concern is that it takes several seconds to run, so it could kill the first link catalog,
(or maybe parts of it?) and I might not know.

Regarding complexity of dependencies, I ran:
   grep "<target " *.xml | wk. -l
 It says we have 233  targets in the system at the moment, so more complex analysis would
not be done by visual inspection. 
:-)

Thanks to Dominique and Scot  for the suggestions to try it  myself - I would do that with
a simplified build.

Rob




--
Rob Echlin, Documentation Systems Architect, Wind River
direct: +1.613.270.5796 | Skype video: rob.echlin.wr | robert.echlin@windriver.com

> -----Original Message-----
> From: Dominique Devienne [mailto:ddevienne@gmail.com]
> Sent: Monday, August 08, 2011 1:03 PM
> To: Ant Users List
> Subject: Re: Are multiple targets run in order, or in parallel?
> 
> 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


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


Mime
View raw message