How to write an Ant script as:
... ...
begin of HERE DOCUMENT > ./outfile.txt
xxx
toto
yyy
zzz
end of HERE DOCUMENT
... ...
Of Whom the execution creates a file called ./outfile.txt Whom contains:
xxx
toto
yyy
zzz
How to write an Ant script as:
... ...
begin of HERE DOCUMENT > ./outfile.txt
xxx
toto
yyy
zzz
end of HERE DOCUMENT
... ...
Of Whom the execution creates a file called ./outfile.txt Whom contains:
xxx
toto
yyy
zzz
If the file's content is REPLACE_ME, then running this tasks will do it:
<!-- Create the file -->
<concat destfile="outfile.txt">REPLACE_ME</concat>
<!-- This property is initialized reading user input -->
<input
message="Please enter file content:"
addproperty="file_content"
/>
<!-- Replace the property value inside the file -->
<replace
file="outfile.txt"
token="REPLACE_ME"
value="${file_content}"
/>