ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cosyns" <xcos...@noctis.be>
Subject converting path separators in properties? possible?
Date Fri, 10 May 2002 12:23:57 GMT
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 ...

Cheers,
Xavier Cosyns





--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message