ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <>
Subject Re: Recursive Property Expansion
Date Mon, 11 Dec 2006 04:09:38 GMT
At 09:15 PM 12/10/2006, you wrote:
 >You can use <propertycopy> from ant-contrib to accomplish some degree
 >of property expansion

...or use a macrodef or, even simpler, use a property file.  Here's 
an example where a property is defined per-project, but globally so 
that all projects can see the property.  For any given project's 
build file, however, one would want to refer to its own property 
generically instead of having to fully qualify the property with it's 
own project name.  For instance...

Globally defined properties (I actually use an XML property file to 
avoid repeating project names constantly)... Project Project

Referenced inside the "myproject" or "otherproject" build files, 
respectively, as....

To accomplish this, one simply provides a property file with the 
following entry...

So, within the current "myproject" build, one can refer to 
${app.Name} and get "My Project" and, at the same time, if 
"otherproject" wants to know the value of app.Name for "myproject", 
they can refer to ${} while, again, referring to 
its own property as ${app.Name}, which would be "Other Project".


 >----- Original Message ----
 >From: Jack J. Woehr <>
 >To: Ant Users List <>
 >Sent: Friday, December 8, 2006 6:06:21 PM
 >Subject: Re: Recursive Property Expansion
 >Hmm, it just seems like five years ago. It was actually 2004.
 >It's still there in
 >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.
 >303-443-7000 ext. 527
 >To unsubscribe, e-mail:
 >For additional commands, e-mail:
 >Do you Yahoo!?
 >Everyone is raving about the all-new Yahoo! Mail beta.
 >To unsubscribe, e-mail:
 >For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message