tags:

views:

42

answers:

3

In ant, within a target are the tasks guaranteed to be executed in order or do I need to set up a (annoyingly long, thin) dependency chain? I couldn't find the answer in the manual or Google, but I may have just missed it. Much thanks.

+1  A: 

Yes, they will be executed in order, assuming that none of the tasks are set up to be conditional (in which case these tasks simply won't be run if their condition evaluates to false).

matt b
Since I got two answers saying they'll be executed in order I'll check this one. Does anyone know if there is an official spec on this? I didn't find one in my limited time to look.
John B.
A: 

Tasks are guaranteed to be executed in any order that satisfies their mutual dependencies. I don't think it's safe to make any assumption beyond that.

You can set up the chain using depends= in the targets, as you probably know. Or you can set up targets that run the other targets in sequence.

Carl Smotricz
A: 

Ant, like make, works on dependencies on a target level. In a target, the actions will operate in a sequential fashion. Targets however can be run in any order that satisfies their dependencies.

Yann Ramin