I am writing a directory path to a text file from ant, which is later read by a Java Application to find another file.
In my ant script I have:
<property name="fulltrainer.dir" location="${trainer.dir}" />
<echo file="${trainer.dir}/properties/commonConfig.properties"># KEY VALUE
CurrentBuildFile=${fulltrainer.dir}\current_build</echo>
in the build.properties file trainer.dir is set to:
trainer.dir=../trainer
It ends up writing:
# KEY VALUE
CurrentBuildFile=C:\Workspaces\ralph\trainer\current_build
to the commonConfig.properties file.
I need it to write:
# KEY VALUE
CurrentBuildFile=C:\\Workspaces\\ralph\\trainer\\current_build
or, I need it to write:
# KEY VALUE
CurrentBuildFile=C:/Workspaces/ralph/trainer/current_build
How can I do that?