• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ant adding backslash before colons in database URL

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

Ant is not behaving the way I would like. It is adding a "\" before my colons in a database URL.

Expected output:


Actual output:


The part in build.xml that does this:


From my build.properties, the value referenced above:


I do not want to use the <replace file="..." token="..." value="..."/> because we have several developers working on this project and the token being searched for may not be the same on each developer's machine.

Any ideas?

Thanks,
Mike
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like Ant thinks it's generating a properties file, since escaping colons like that is mandatory in a properties file. If you don't want a properties file, perhaps you should use some Ant task other than "propertyfile".
 
Michael Freake
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Paul,

I had no idea that was the case in properties files. I just read some more about it here: http://download.oracle.com/javase/6/docs/api/java/util/Properties.html#load(java.io.Reader)

I will be now be using the <replace .../> to avoid this.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic