You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Holger Danske <ho...@yahoo.de> on 2001/12/04 07:31:02 UTC

Reset an existing property

Hello Ant-User.

One, I hope, simple question.

Is it possible to reset an existing property,
something like

<property name="dir.src" value="./src"/>
<property name="dirty.src" value="d:\CVS\...."/>
<property name="dir.src" value="${dirty.src}"/>

The sample is simplify, but it is enough to describe
what I want.


TIA
JD

__________________________________________________________________
Nokia 5510. Verrücktes Design! Toller Sound! 
Entdecke und gewinne es auf http://de.promotions.yahoo.com/nokia/ 
Gewinnspiel endet am 16. Dezember 2001.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Reset an existing property

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
This is now deprecated behavior though.  Properties *should* be immutable
and things have tightened up quite a bit with it in the nightly builds
recently, although this particular "hole" is still open yet a deprecation
warning will be output when overriding a property using <available>

    Erik


----- Original Message -----
From: "Kurien Mathew" <ku...@envivio.com>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Tuesday, December 04, 2001 2:05 PM
Subject: RE: Reset an existing property


> > > One, I hope, simple question.
> > >
> > > Is it possible to reset an existing property,
> > > something like
> > >
> > > <property name="dir.src" value="./src"/>
> > > <property name="dirty.src" value="d:\CVS\...."/>
> > > <property name="dir.src" value="${dirty.src}"/>
> > >
>
> Here is an alternative :
>
> <property name="dir.src" value="./src"/>
> <property name="dirty.src" value="d:\CVS\...."/>
>
> <available file="." property="dir.src" value="${dirty.src}"/>
>
> Note: <available> task must be enclosed in some <target>
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Reset an existing property

Posted by Kurien Mathew <ku...@envivio.com>.
> > One, I hope, simple question.
> >
> > Is it possible to reset an existing property,
> > something like
> >
> > <property name="dir.src" value="./src"/>
> > <property name="dirty.src" value="d:\CVS\...."/>
> > <property name="dir.src" value="${dirty.src}"/>
> >

Here is an alternative :

<property name="dir.src" value="./src"/>
<property name="dirty.src" value="d:\CVS\...."/>

<available file="." property="dir.src" value="${dirty.src}"/>

Note: <available> task must be enclosed in some <target>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Reset an existing property

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
No need to fear it.   Property immutability is one of the features that
makes Ant flexible and powerful, believe it or not.  I'm sure if you posed
your scenario to the list that someone could help you resolve it within the
confines of Ant's property rules.

    Erik


----- Original Message -----
From: "Holger Danske" <ho...@yahoo.de>
To: "Ant Users List" <an...@jakarta.apache.org>
Sent: Tuesday, December 04, 2001 6:48 AM
Subject: Re: Reset an existing property


> I had feared it.
>
> JD
>
> __________________________________________________________________
> Nokia 5510. Verrücktes Design! Toller Sound!
> Entdecke und gewinne es auf http://de.promotions.yahoo.com/nokia/
> Gewinnspiel endet am 16. Dezember 2001.
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Reset an existing property

Posted by Holger Danske <ho...@yahoo.de>.
I had feared it.

JD 

__________________________________________________________________
Nokia 5510. Verrücktes Design! Toller Sound! 
Entdecke und gewinne es auf http://de.promotions.yahoo.com/nokia/ 
Gewinnspiel endet am 16. Dezember 2001.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Reset an existing property

Posted by Erik Hatcher <ja...@ehatchersolutions.com>.
No.

Properties are immutable!

    Erik


----- Original Message -----
From: "Holger Danske" <ho...@yahoo.de>
To: <an...@jakarta.apache.org>
Sent: Tuesday, December 04, 2001 1:31 AM
Subject: Reset an existing property


> Hello Ant-User.
>
> One, I hope, simple question.
>
> Is it possible to reset an existing property,
> something like
>
> <property name="dir.src" value="./src"/>
> <property name="dirty.src" value="d:\CVS\...."/>
> <property name="dir.src" value="${dirty.src}"/>
>
> The sample is simplify, but it is enough to describe
> what I want.
>
>
> TIA
> JD
>
> __________________________________________________________________
> Nokia 5510. Verrücktes Design! Toller Sound!
> Entdecke und gewinne es auf http://de.promotions.yahoo.com/nokia/
> Gewinnspiel endet am 16. Dezember 2001.
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>