ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wannheden, Knut" <>
Subject RE: [myrmidon] -ref vs ${}
Date Thu, 04 Apr 2002 12:40:09 GMT
Just a question:

would the following


have fetched the the value of the property with name "${other-attr}" or the
value a property named like the value of property "other-attr", i.e. nested

I was wondering because as I understand it the following would certainly not
have resolved the nested properties:


While on the topic of referencing properties: will the referenced properties
(as "other-attr" in "${other-attr}") have to be defined in advance and the
respective value copied or will it be reevaluated on demand (every time
again)?  Example:

<target name="print-ant">
 <property name="msg" value="Message: ${foo}"/>
 <property name="foo" value="ant"/>
 <echo message="${msg}"/>

would result in "Message: ant" instead of "Message: ${foo}".  A datatype
subclassing property (xproperty), where the value wasn't imutable, would
then result in different values of other properties referencing the
xproperty every time the referenced xproperty is changed.  Example:

<target name="print-true-or-false">
 <property name="msg" value="Message: ${foo}"/>
 <xproperty name="foo" value="true"/>
 <echo message="${msg}"/>
 <xproperty name="foo" value="false"/>
 <echo message="${msg}"/>

would give "Message: true" followed by "Message: false".

I'm not saying that this necessarily is the desired behaviour, I'm just
curious on how the resolution of referenced properties will work in the


> -----Original Message-----
> From: Darrell DeBoer []
> Sent: Freitag, 5. April 2002 09:30
> To: Ant Developers List
> Subject: Re: [myrmidon] -ref vs ${}
> On Sun, 31 Mar 2002 14:02, Peter Donald wrote:
> > Hi,
> >
> > I just wanted to get peoples opinion on something I been 
> playing with.
> > Currently in myrmidon the followin attributes will get 
> identical values
> >
> > myAttribute="${value}"
> > myAttribute-ref="value"
> >
> > My question is do we need to support the "-ref" version of attribute
> > evaluation or is the first sfficient for all our use cases?
> +1 to removing the "-ref"syntax.
> -- 
> ciao,
> Daz
> --
> To unsubscribe, e-mail:   
> <>
> For additional commands, e-mail: 
> <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message