OK,

I've fixed this. One error was caused by a $ at the end of a property value.
The other is because ProjectHelper.replaceProperties is called twice on the
value being set - once in ProjectHelper.configure and again in
Property.init. I removed the call in Property.init.

Conor

--
Conor MacNeill
Home: [EMAIL PROTECTED]
Work: [EMAIL PROTECTED]
Web:  www.cortexebusiness.com.au


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Saturday, 24 June 2000 3:01
> To: [EMAIL PROTECTED]
> Subject: Re: dollar signs in replace commands
>
>
> Except that if you do:
>
> <property name="var1" value="$$a" />
> <property name="var2" value="${var1}+somethingelse" />
> <echo message="${var1},${var2}" />
>
> you won't get what you expect...  and if you remove the "a" from
> "$$a" you will
> even get:
>
> BUILD CONFIG ERROR
>
> java.lang.StringIndexOutOfBoundsException: String index out of range: 1
>         at org.apache.tools.ant.taskdefs.Property.init(Property.java:126)
>         at
> org.apache.tools.ant.ProjectHelper$TaskHandler.init(ProjectHelper.
> java:332)
>         at
> org.apache.tools.ant.ProjectHelper$TargetHandler.startElement(Proj
> ectHelper.java:311)
>
>         at com.sun.xml.parser.Parser.maybeElement(Parser.java:1391)
>         at com.sun.xml.parser.Parser.content(Parser.java:1499)
>         at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
>         at com.sun.xml.parser.Parser.content(Parser.java:1499)
>         at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
>         at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
>         at com.sun.xml.parser.Parser.parse(Parser.java:284)
>         at
> org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:104)
>         at
> org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:86)
>         at org.apache.tools.ant.Main.runBuild(Main.java:228)
>         at org.apache.tools.ant.Main.main(Main.java:191)
>
> (All this with a copy of ANT taken from CVS a week or so ago....)
>
> Cheers,
> :E
>
>
>
>
>
>
> From: Stefan Bodewig <[EMAIL PROTECTED]>  on 23/06/2000 15:10 GMT
>
> Please respond to [EMAIL PROTECTED]
>
>
>
>
>
>
>
>
> |--------->
> |         |
> |--------->
>
> >-----------------------------------------------------------------
> ---------->
>   |
>             |
>
> >-----------------------------------------------------------------
> ---------->
>   >-------------------------------------------|
>   |                                           |
>   >-------------------------------------------|
> |--------->
> |To:      |
> |--------->
>
> >-----------------------------------------------------------------
> ---------->
>   |[EMAIL PROTECTED]
>             |
>
> >-----------------------------------------------------------------
> ---------->
>   >-------------------------------------------|
>   |                                           |
>   |                                           |
>   >-------------------------------------------|
> |--------->
> |cc:      |
> |--------->
>
> >-----------------------------------------------------------------
> ---------->
>   | (bcc: Eric Mountain/NCE/AMADEUS)
>             |
>
> >-----------------------------------------------------------------
> ---------->
>   >-------------------------------------------|
>   |                                           |
>   |                                           |
>   >-------------------------------------------|
> |--------->
> |         |
> |--------->
>
> >-----------------------------------------------------------------
> ---------->
>   |
>             |
>
> >-----------------------------------------------------------------
> ---------->
>   >-------------------------------------------|
>   |                                           |
>   >-------------------------------------------|
> |--------->
> |Subject: |
> |--------->
>
> >-----------------------------------------------------------------
> ---------->
>   |Re: dollar signs in replace commands
>             |
>
> >-----------------------------------------------------------------
> ---------->
>   >-------------------------------------------|
>   |                                           |
>   >-------------------------------------------|
>
>
>
>
>
>
>
> >>>>> "SB" == Stuart Barlow <[EMAIL PROTECTED]> writes:
>
>  SB> Is there any way that I can get ant to recognise as literal
>  SB> strings?
>
> I'm not sure I've understood your problem. If you need a literal $
> inside your build.xml write it as $$.
>
> Does this help?
>
> Stefan
>
>
>
>

Reply via email to