ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dale Anson <>
Subject Re: ant-contrib <for> and property immutability
Date Tue, 27 Jan 2004 17:51:27 GMT
Scott's take on <variable> is correct -- it can only override, not 
remove a property. Once the property is created, either via <property> 
or <variable> or whatever, it exists. Variable does not delete or remove 
a property, although that sounds like a feature request to me.


Matt Benson wrote:
> --- "Stirling, Scott" <>
> wrote:
>>I know at least that in cases where the
>>existence/non-existence of a property is used to
>>test a condition in a loop, <variable> won't be able
>>to, for example, unset (i.e., delete/remove) a
>>property once it's been created.  It can only
>>override the value.
> I don't know if that's so.  Without testing it, and
> with a quick look at the code not quickly yielding the
> mechanism by which it is accomplished, the
> documentation nevertheless says that ordinary
> property-aware tasks can successfully set the value of
> a property previously unset using the <variable> task
> with an empty text value (omitting the text attribute
> appears, judging from the code, to have the same
> effect).  While this may or may not (probably not)
> look like a nonexistent property to a target's
> if/unless attributes, you should, in <for>'s
> <sequential>, be able to unset your <variable> during
> every iteration.
> But I could be wrong...
> -Matt
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message