ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <>
Subject Re: toggling a property to control target execution
Date Wed, 23 May 2001 20:18:48 GMT
--- Lou Colon <> wrote:
> Is there a way to unset a property?

Not currently. I seem to remember someone recently sending either a new
task to do that or a mod to <property>, but I couldn't find anything in
the archives. So either I dreamed it, or I just didn't hit on the right
thing to search for -- maybe you'd have better luck.

> I am trying to use the conditional target execution based on a property.
>  The problem is that once the property has been set (to any value) I
> have not been able to return to the previously set state. For example,
> <ant target="doSomething">
> 	<!- does nothing since prop is not set ->
> </ant>
> <ant target="doSomething">
> 	<property name="prop" value="anything"/>
> 	<!- executes doSomething since prop is set ->
> </ant>
> <ant target="doSomething">
> 	<!- executes doSomething since prop was already set
> 	     but I want to turn it off ->
> </ant>

But this example should work (and does, for me), since "prop" should only
be set during the execution of the second <ant>. (BTW: You can use
<antcall> instead of <ant>, if you're running a target in the current



Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

View raw message