Hello all,

we've recently decided to replace all our shell scripts with ant tasks, and I'm 
currently faced with the following problem: I need to replace arbitrary strings 
in a number of source files with different values, e.g. "http://www.foo.com"; 
would be replaced by "http://test.bar.net";, "prod.value=5" by "test.value=10", 
etc. 
The problem is that the strings to be changed aren't clearly (i.e. with a 
distinctive begin/end character) delimited in the source files.

I have a property file where all the strings to be replaced, as well as their 
new values, are defined. I've tried to do this :

<copy todir="${new.dir}">
        <fileset refid="filesToBeChanged"/>
        <filterset begintoken="" endtoken="">
                <filtersfile file="${my.property.file}"/>
        </filterset>
</copy>

However, this fails because filterset won't accept empty delimiters. I've 
thought of using the replace task instead, but I can't define the tokens to be 
replaced using a property file: I have to list them all by hand in the 
build.xml file. Is there any way to avoid listing all the replacement strings 
in the build.xml file and still use the replace task?

Thanks in advance.

Laurent Leconte

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to