You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Jack J. Woehr" <jw...@absolute-performance.com> on 2006/12/09 00:49:36 UTC

Recursive Property Expansion

Sometime in 2001 we were all discussing recursive property expansion:

<project default="all">
   <target name="all">
     <property name="foo" value="woof"/>
     <property name="bar" value="arf"/>
     <property name="woof.arf" value="It works!"/>
     <echo> ${${foo}.${bar}} </echo>
   </target>
</project>

This would echo "It works!" with recursive expansion. In 1.7.0RC1
it echoes ${${foo}.arf} .

I submitted a patch once or twice that would make this work and
everyone seemed to nod very seriously over it :-) But five years
later Ant properties still don't expand recursively.

I've got macros that do this, but still, doesn't recursive expansion
just fit Ant perfectly? Is there anyone who has ever used Ant who
didn't expect properties to work that way until they found out
that they don't?

-- 
Jack J. Woehr
Director of Development
Absolute Performance, Inc.
jwoehr@absolute-performance.com
303-443-7000 ext. 527



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Recursive Property Expansion

Posted by Dominique Devienne <dd...@gmail.com>.
On 12/8/06, Jack J. Woehr <jw...@absolute-performance.com> wrote:
> Hmm, it just seems like five years ago. It was actually 2004.
> It's still there in http://issues.apache.org/bugzilla/show_bug.cgi?
> id=29347
>
> > Sometime in 2001 we were all discussing recursive property expansion:

Welcome back Jack. I've kept your patch in the back of my mind you know.
Yet, similar to Peter's thoughts, I feel like BC might prevent
recursive property expansion to get thru. I'd thus encourage you to
look into a custom PropertyHelper and new ways to more easily declare
one in the build file, and/or thru an Antlib. --DD

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Recursive Property Expansion

Posted by Peter Reilly <pe...@gmail.com>.
There are a couple of reasons for this.
1) the ant dev team does not like to break backwards
compatiblity, especially for ant scripts, even if the
benifits are obvious.
2) the property handling code is a little tricky and has
given rise a number of bugs over the years. For example
there is a bug currently outstanding :
http://issues.apache.org/bugzilla/show_bug.cgi?id=40561
3) If recursive expansion of properties are allowed, why not go
all the way and implement an EL for properties?

Peter


On 12/9/06, Jack J. Woehr <jw...@absolute-performance.com> wrote:
> Hmm, it just seems like five years ago. It was actually 2004.
> It's still there in http://issues.apache.org/bugzilla/show_bug.cgi?
> id=29347
>
> On Dec 8, 2006, at 4:49 PM, Jack J. Woehr wrote:
>
> > Sometime in 2001 we were all discussing recursive property expansion:
>
> --
> Jack J. Woehr
> Director of Development
> Absolute Performance, Inc.
> jwoehr@absolute-performance.com
> 303-443-7000 ext. 527
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Recursive Property Expansion

Posted by "Jack J. Woehr" <jw...@absolute-performance.com>.
Hmm, it just seems like five years ago. It was actually 2004.
It's still there in http://issues.apache.org/bugzilla/show_bug.cgi? 
id=29347

On Dec 8, 2006, at 4:49 PM, Jack J. Woehr wrote:

> Sometime in 2001 we were all discussing recursive property expansion:

-- 
Jack J. Woehr
Director of Development
Absolute Performance, Inc.
jwoehr@absolute-performance.com
303-443-7000 ext. 527



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org