ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: toggling a property to control target execution
Date Wed, 23 May 2001 21:07:09 GMT
I have a similar problem. I made a fix for it but I'm not sure it's the best
way to do it, hopefully someone will answer me. In my case the problem was
with uptodate that would fail when the same propery name is used across
multiple build.xml files.

I could easilly send a patch to be able to unset a property of a new task if
you guys want. But it can be dangerous (cause of dependancies).


-----Original Message-----
From: Diane Holt []
Sent: Wednesday, May 23, 2001 4:19 PM
Subject: Re: toggling a property to control target execution

--- 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