You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Miten Mehta <mi...@hotmail.com> on 2000/11/15 18:16:36 UTC

suggestions

Hello,

while using build files I hit against some things which could be that I am 
not aware of:

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

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

Please cc reply to miten_s_mehta@hotmail.com
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Re: suggestions

Posted by Stefan Bodewig <bo...@bost.de>.
Miten Mehta <mi...@hotmail.com> 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
file.

Stefan