ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sujan Digumarti <>
Subject RE: converting path separators in properties? possible?
Date Fri, 10 May 2002 12:56:22 GMT
i'm sorry if i havent understood but i dont see a problem at all ...

first replace the '\' to '/' and then load the properties file in a
different target

hope this is what u wanted


-----Original Message-----
From: Cosyns []
Sent: Friday, May 10, 2002 5:54 PM
Subject: converting path separators in properties? possible?

Hi list,

I have a big issue with the path separator, as i could not find any
suitable sollution in the archives i use the list.

I have a properties file generated by a external tool containing path in
platform specific way like 'install.dir=c:\myprogram\mydir' and I need
to put that directory file in a xml configuration file in the url style
using '/'.

I thought I could use the 'replace' tag on my properties file to convert
all '\' to '/', and it works fine. Afterwards replacing a token
@MYINSTALLDIR@ in my xml configuration file by that modified property,
but that does not work as properties are immutable. So the only way
around I found is to launch once a script for replacing the slashes.
Then running a new script for replacing my token in my configuration
way. This is not really the way we want to have it, as we would like to
have the simplest procedure for end users installing the program. 

I also tried with the 'propertyfile' tag but it has the same problem, it
will still use the old property.

So I thought writing my custom task but I am not sure if I will be able
to find a way around the immutable properties, and I do not think it
would be clean to do so.

So if anyone has some ideas ...

Xavier Cosyns

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message