ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 50468] Using $$ in ANT
Date Wed, 27 Jul 2011 13:01:10 GMT

Stefan Bodewig <> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from Stefan Bodewig <> 2011-07-27 13:01:10 UTC ---
This really is a user question and not a blocker bug.  I don't know why I never
saw this issue, something must have been wrong with my mail system, so sorry
you had to wait that long for an answer.

For historical reasons Ant translates $$ to $ as a way to escape property

stefan@birdy:/tmp$ cat dollar.xml 
<project name="test" basedir=".">
    <property name="value1" value="SNAPTIME$"/>
    <property name="value2" value="SNAPTIME$$"/>
    <property name="value3" value="SNAPTIME$$$"/>
    <property name="value4" value="SNAPTIME$$$$"/>

    <target name="print">
        <echo message="$${value1}: ${value1}"/>
        <echo message="$${value2}: ${value2}"/>
        <echo message="$${value3}: ${value3}"/>
        <echo message="$${value4}: ${value4}"/>
stefan@birdy:/tmp$ ant -f dollar.xml print
Buildfile: /tmp/dollar.xml

     [echo] ${value1}: SNAPTIME$
     [echo] ${value2}: SNAPTIME$
     [echo] ${value3}: SNAPTIME$$
     [echo] ${value4}: SNAPTIME$$

Total time: 0 seconds

This is Ant 1.8.2.

Three or four $s should do.

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message