ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From philippe.lav...@cactus.ca
Subject RE: toggling a property to control target execution
Date Wed, 23 May 2001 21:30:16 GMT
Isn't it dangerous though ?  With dependancies, how do you know when a
property is set and unset ?

Just curious if you will implement a 'per context' property.

In a single build.xml file the problem doesn't really arise, but in multiple
build.xml files you will most likely re-use the same property name (for
consistance sake) and then you get into problems if you unset something that
someone will need down the road.    

Phil

-----Original Message-----
From: Mark Chamness [mailto:markc@cacheware.com]
Sent: Wednesday, May 23, 2001 5:18 PM
To: ant-user@jakarta.apache.org
Subject: RE: toggling a property to control target execution


This is a known RFE (request for enhancement).
Vote for it.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1732

For future reference, the bug database can be queried at:
http://nagoya.apache.org/bugzilla/query.cgi

-mark

> -----Original Message-----
> From: Diane Holt [mailto:holtdl@yahoo.com]
> Sent: Wednesday, May 23, 2001 1:19 PM
> To: ant-user@jakarta.apache.org
> Subject: Re: toggling a property to control target execution
>
>
> --- Lou Colon <lcolon@edocs.com> 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
> build-file.)
>
> Diane
>
> =====
> (holtdl@yahoo.com)
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/

Mime
View raw message