ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: Property inside property
Date Tue, 24 Jun 2003 14:11:52 GMT
Check out the <propertycopy> task from the Sourceforge ant-contrib 
project.  It does what you need.  Ant itself does not handle this type 
of nested syntax.

	Erik


On Tuesday, June 24, 2003, at 10:03  AM, Jaco Greeff wrote:

> Hi,
>
> I would like to do use a property "inside" property type definition in 
> an ant build file, maybe it is possible in other way than my tests 
> suggest. To explain exactly what I want to accomplish, an example is 
> in order:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="test" default="test">
>     <property name="a" value="b" />
>     <property name="b" value="c" />
>     <property name="c" value="${${a}}" />
>
>     <target name="test">
> 	<echo message="a: ${a}" />
> 	<echo message="b: ${b}" />
> 	<echo message="c: ${c}" />
>     </target>
> </project>
>
> When executing the following output is to be displayed:
>
> a: b
> b: c
> c: c (currently displaying ${${a}})
>
> Is it possible in some way? Obviosuly the ${${a}} construct doesn't 
> deliver the desired result. I have played around with a couple of 
> constructs, leading me to believe this is not possible.
>
> Greetings,
> Jaco
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message