ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gunnar Boström <Gunnar.N.Bost...@telia.se>
Subject RE: if, unless problems
Date Fri, 08 Dec 2000 11:59:16 GMT
comments below.
:-)


> -----Original Message-----
> From: Stefan Bodewig [mailto:bodewig@apache.org]
> Sent: den 8 december 2000 12:00
> To: ant-user@jakarta.apache.org
> Subject: Re: if, unless problems
> 
> 
> Gunnar Boström <Gunnar.N.Bostrom@telia.se> wrote:
> 
> > I understand your explanation but I think the "concept" is difficult
> > to understand. In all(most?) other situations in ant it is the value
> > of the property that is interesting not its existens.
> 
> Hmm, the if/unless attributes have been invented to play together with
> <available>. This is not saying it must be that way, merely explaining
> why it has been implemented like it is. The build files for my own
> project would not benefit from testing the value of a property.

<available> (if no value-attribute is given) and <uptodate> both sets the
property to "true" so this would not break my suggestion that if/unless
should check the value. 

> 
> If you wanted to do that, you'd probably need more control than "the
> value is true or false", you'd want to test for a specific
> value. You'd need an equality operator inside the if/unless
> attributes, which has been ruled out several times as it pushes Ant
> further onto the road to a scripting language.

I agree that ant shall not become a scripting language and I don't want to
include an eqality operator.

Still I belive that testing for the values "true"/"false" in if/unless would
make ant more consistent and easier for beginners like me.

> 
> Stefan
> 

Mime
View raw message