ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Landon <RLan...@youbet.com>
Subject RE: How to use $ in a ANT property value
Date Mon, 07 Aug 2000 19:06:46 GMT
We're very confused. From a previous post:

<property name="helper.classes" value="Helper$$1.class:Helper$$2.classs"/>

<target name="tryme">
<echo message="${helper.classes}"/>
</target>


build.sh tryme 
What does it print? (cut-and-paste into a build.xml)
Try it and you will verify that it prints the following:

Project base dir set to: C:\ElectronicWagering\src
Executing Target: tryme
Helper1.class:Helper2.classs

Is this the expected result or NOT?
It seems that the expected result is Helper$1.class:Helper$2.class, which
is not the real result. Is this a bug in ANT?


-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@bost.de]
Sent: Monday, August 07, 2000 1:54 AM
To: ant-user@jakarta.apache.org
Subject: Re: How to use $ in a ANT property value


>>>>> "KP" == K Plummer <kplummer1@earthlink.net> writes:

 KP> Is ant expanding away the preceeding $ on $$1 on the first macro
 KP> (leaving $1) which becomes 1 on subsequent macro expansions?

Yes, $$ will simply be translated to $ by Ant, that's all. No further
processiong will be done by Ant.

I think, what you see is sh processing the $ sign you are sending on
the command line to the <exec> task. Maybe \$$ is what you want? Ant
woukld translate this to \$ and sh to $.

Stefan

Mime
View raw message