ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: suggestions
Date Thu, 16 Nov 2000 08:31:25 GMT
Miten Mehta <> wrote:

> 1.  how to do conditional task (w/o breaking task into independent
> task of its own)?

Not sure what you mean, if you want something like the target's if
attribute at a task level, it's not there (and most likely will never
be). No way around using a target to hold the task you want to execute
conditionally - and maybe use <antcall> to run that target if the
depends attribute of target doesn't fit your bill.

> 2.  does targets(tasks) definition order matter like functions in
> shell script?

Speaking of Ant 1.2 as 1.1 and prior have some special semantics for
some tasks that are kind of silly:

The order by which targets are defined doesn't matter at all, they
will always get executed in an order that ensures all targets that a
given target depends on have been run prior to that target.

Of course the order of tasks inside a target matters. Some "tasks" can
be placed outside of targets (property and taskdef), order is relevant
here as well - they will be executed while Ant is parsing the build


View raw message