ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50468] Using $$ in ANT
Date Wed, 27 Jul 2011 13:01:10 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50468

Stefan Bodewig <bodewig@apache.org> changed:

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

--- Comment #2 from Stefan Bodewig <bodewig@apache.org> 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
references.

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}"/>
    </target>
</project>
stefan@birdy:/tmp$ ant -f dollar.xml print
Buildfile: /tmp/dollar.xml

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

BUILD SUCCESSFUL
Total time: 0 seconds

This is Ant 1.8.2.

Three or four $s should do.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message