You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Colin 't Hart <ct...@gbs.com.au> on 2000/06/27 06:52:04 UTC

$ at end of property value

Hello,

There seems to be a problem with Ant when there is a dollar sign ($)
at the end of a property value,

eg:

<property name="version" value="$Revision: $" />

reports

java.lang.StringIndexOutOfBoundsException: String index out of range: 12
        at java.lang.String.charAt(Compiled Code)
        at org.apache.tools.ant.ProjectHelper.replaceProperties(Compiled
Code)
        at org.apache.tools.ant.ProjectHelper.configure(Compiled Code)
        at org.apache.tools.ant.ProjectHelper.configureProject(Compiled
Code)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:134)
        at org.apache.tools.ant.Main.runBuild(Compiled Code)
        at org.apache.tools.ant.Main.main(Compiled Code)


Ant seems to want to check that the next character is a '{'.

Please CC me on replies.

Cheers,

Colin

Colin 't Hart               tel: +61 (03) 6223 1999
Systems Analyst             fax: +61 (03) 6223 1988
Geographic Business Systems
PO Box 844 SANDY BAY, Tasmania 7006


Re: $ at end of property value

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "C'H" == Colin 't Hart <ct...@gbs.com.au> writes:

 C'H> Hello, There seems to be a problem with Ant when there is a
 C'H> dollar sign ($) at the end of a property value,

This should be fixed by a patch commited by Conor yesterday, please
try with the CVS version or the latest snapshot.

 C'H> eg:

 C'H> <property name="version" value="$Revision: $" />

But you'll still need to change that to

<property name="version" value="$$Revision: $$" />

to get the expected result.

Stefan