> From: Jack J. Woehr [mailto:[EMAIL PROTECTED]

> I wrote a quick counter-example which shows how expansions of properties
> in Ant is not recursive:
> 
>      <?xml version="1.0" encoding="UTF-8"?>
>      <project basedir="." default="all" name="changeme">
>          <target name="all">
>              <property name="a" value="arf"/>
>              <property name="b" value="bark"/>
>              <property name="arf.bark" value="woof woof woof"/>
>              <echo message="${${a}.${b}}"/>
>          </target>
>      </project>
> 
> but when I ran it, in Ant version 1.7 alpha built from CVS last night,
> instead of getting the  unexpanded value of
> the overall expression which I expected:
> 
>      [echo] ${${a}.${b}}
> 
> I received the unexpected:
> 
>      [echo] ${${a}.bark}
> 
> This does not seem to me to be correct by the rules of Ant. Either the
> internal expansion should be complete or not
> at all ... the right term should not expand and leave the left unexpanded.
> It seems to me the expected answer was
> the one returned by Ant version 1.6.1 but I don't have that built now to
> see if the current behavior is a regression.

I believe that ${${a}.${b}} is parsed as:

getProperty("${a") + "." + getProperty("b") + "}", thus the result. --DD

C:\oss\org_apache\antx>C:\pro\ant1.6.1\bin\ant -f woof.xml
Buildfile: woof.xml
     [echo] ${${a}.bark}

BUILD SUCCESSFUL
Total time: 0 seconds
C:\oss\org_apache\antx>C:\pro\ant1.6\bin\ant -f woof.xml
Buildfile: woof.xml
     [echo] ${${a}.bark}

BUILD SUCCESSFUL
Total time: 0 seconds

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to