Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Howto do this in Ant: Replace a placeholder in a file with the content in anothe

Howto do this in Ant: Replace a placeholder in a file with the content in anothe

2005-07-04       - By Christine Gerstenmayer

Hi all,

I need your help.



I want to replace a placeholder in a file with the content of another file.



e.g.



File 1:

Xxxxxxxxxxxxxxx

Xxxxxxxxxxxxxxxxx

Xxxxxxxxxxxxxxx

&place



File 2:

Abcdefg

Abcdefg

Abcdefg



I want to replace "&place" in File 1 with the content of File 2 so that
afterwards File 1 looks like that:



File 1:

Xxxxxxxxxxxxxxx

Xxxxxxxxxxxxxxxxx

Xxxxxxxxxxxxxxx

Abcdefg

Abcdefg

Abcdefg



How can I do this in Ant ?



Please help.



Thanks in advance.



Christine






©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.