1
votes

My ant script is,

<target name="temp">
    <property name="argument" value="xyz abc"/>
    <echo message=" & quot;${argument}& quot;"/>
</target>

Output is

xyz abc

Expected Output is

"xyz abc"

How to get the expected output. I tried like this &quot;quot;${argument}&quot;quot;, this is also not working.

Note : I am using ant 1.8.2 and antcontrib in windows 7.

1
Updated. Removed some mistakes.rashok

1 Answers

5
votes

Is there a space between & and quot;?

This works for me:

<target name="temp">
    <property name="argument" value="xyz abc"/>
    <echo message="&quot;${argument}&quot;"/>
</target>

Output:

temp:
     [echo] "xyz abc"
BUILD SUCCESSFUL
Total time: 469 milliseconds