ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wascally Wabbit <>
Subject Re: recursive expansion of property names
Date Fri, 25 Jun 2004 14:01:23 GMT
At 07:32 PM 6/24/2004, you wrote:
>sorry, I copied the line from a macro and forgot to modify the @.
>Your example (first one) doesn't load properties from a file nor import 
>the environment variables.  Are they handled differently?

You'd have too look at <property>'s implementation but wrt. the custom
PropertyHelper I would not think it makes little difference (not checked).
If you're passing all the "sets" and the "gets" through to the original
helper (Ants) you should be ok.

What is the sample you wanted to show didn't work? The original you
posted was wrong.

>In example two, it should resolve as follows (if everything worked correctly):
>ant print:
>'ant.file(1)': ${ant.file}
>because ${ant.file} is not defined.
>if you added the definition:
>   <property name="ant.file" value="ant.file" />
>then it would resolve ${ant.file} and print:
>'ant.file(1)': ant.file

This is still wrong isn't it? I wanted it to resolve to the value
of the 'ant.file' property (which the Ant runtime already auto-installs).
But this is a'll have to ping the original author
of the recursive algo for whether my sample makes sense...

>Jeffrey Bacon
>Creative Developer
>Wascally Wabbit wrote:
>>A typo? I don't think normal property expansion recognizes
>>the '@'; that token is reserved for use inside
>>This works fine for me:
>>   <property name="afN" value=".file"/>
>>   <echo message="'ant.file(0)': ${ant${afN}}"/>
>>This does not work (the recursive code doesn't handle it):
>>     <property name="_dot" value ="."/>
>>     <property name="_ant" value="ant"/>
>>     <property name="_file" value="file"/>
>>     <echo message="'ant.file(1)': ${${_ant}${_dot}${_file}}"/>
>>At 06:34 PM 6/24/2004, you wrote:
>>>well that's better.  It resolves the ${basedir} now but won't resolve 
>>>properties defined as so:
>>>   <property environment="env" />
>>>   <property file="${basedir}/@{file}" />
>>>Jeffrey Bacon
>>>Creative Developer
>>>[[ snip ]]
>>The Wabbit

The Wabbit 

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

View raw message