You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Inger, Matthew" <in...@Synygy.com> on 2003/08/22 16:09:54 UTC

Condition as a top level element

Is it possible in the future to make <condition> a top level element?
It's essentially the same idea as <property>, but with restrictions.
The basic reason is that i'd like to have something like this at the
top of my project:

<condition property="script.extension" value=".sh">
   <os family="unix" />
</condition>

<condition property="script.extension" value=".bat">
   <os family="windows" />
</condition>


So that I don't have to muddy up the depend structure in
order for a target to know what extension to use for a script
file on the current os.

Thoughts?

----------------
Matthew Inger [inger@synygy.com]
Software Developer
Synygy, Inc
610-664-7433 x 7770
"Man who jump off cliff, leap to conclusions." - Confucious


Re: Condition as a top level element

Posted by Antoine Levy-Lambert <an...@antbuild.com>.
Should work in ant 1.6
Antoine
----- Original Message ----- 
From: "Inger, Matthew" <in...@Synygy.com>
To: <an...@jakarta.apache.org>
Sent: Friday, August 22, 2003 4:09 PM
Subject: Condition as a top level element


> Is it possible in the future to make <condition> a top level element?
> It's essentially the same idea as <property>, but with restrictions.
> The basic reason is that i'd like to have something like this at the
> top of my project:
> 
> <condition property="script.extension" value=".sh">
>    <os family="unix" />
> </condition>
> 
> <condition property="script.extension" value=".bat">
>    <os family="windows" />
> </condition>
> 
> 
> So that I don't have to muddy up the depend structure in
> order for a target to know what extension to use for a script
> file on the current os.
> 
> Thoughts?
> 


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


Re: Condition as a top level element

Posted by Steve Loughran <st...@iseran.com>.
Inger, Matthew wrote:
> Is it possible in the future to make <condition> a top level element?

Consider it done. Indeed, download any Ant1.6 nightly build for some 
months and you will find it done :)

In ant 1.6, any task can be a toplevel element. We strongly encourage 
you to be careful and not put much other than side-effect-free code in 
at the top level, but it is left to you..l.

-steve


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