I have the following script:

<project default="test">
 <property name="prop2" value="value2-${prop1}"/>
 <property name="prop1" value="value1"/>
 <target name="test">
   <echo>prop2 as property  (from target)   : ${prop2}</echo>
   <test/>
 </target>

 <macrodef name="test">
   <attribute name="prop2" default="${prop2}"/>
   <sequential>
     <echo>prop2 as property  (from macrodef) : ${prop2}</echo>
     <echo>prop2 as attribute (from macrodef) : @{prop2}</echo>
   </sequential>
 </macrodef>
</project>

The output is:

D:\tmp>ant
Buildfile: build.xml

test:
    [echo] prop2 as property  (from target)   : value2-${prop1}
    [echo] prop2 as property  (from macrodef) : value2-${prop1}
    [echo] prop2 as attribute (from macrodef) : value2-value1

BUILD SUCCESSFUL
Total time: 0 seconds


The output of the first 2 <echo>'s are what I expected, but the
third <echo> output seems odd.

Is this normal ANT behaviour, or should this be considered a bug
for which I should open a bug report?

Btw, I got this behaviour on ANT 1.6.5 and 1.7.0.

Best regards,
Davy Toch


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

Reply via email to