Create a new output file in ant replace task

Posted by Sathish on Stack Overflow See other posts from Stack Overflow or by Sathish
Published on 2010-05-07T21:28:49Z Indexed on 2010/05/07 21:38 UTC
Read the original article Hit count: 224

Filed under:
|

Ant replace task does a in-place replacement without creating a new file.

The below snippet replaces tokens in any of the *.xml files with the corresponding values from my.properties file.

<replace dir="${projects.prj.dir}/config" replacefilterfile="${projects.prj.dir}/my.properties" includes="*.xml" summary="true"/'>

I want those *.xml files that had their tokens replaced be created as *.xml.filtered (for e.g.) and still have the original *.xml.

Is this possible in Ant with some smart combination of tasks and concepts ?

© Stack Overflow or respective owner

Related posts about ant

Related posts about replace