As reported by Raphael Scott on mailing list:
While running some old build files developed prior to the current 2.3.0 release(no svn, just stable PEAR package) I encountered some weird replace tokens behaviour.
Even tried to pull them out of a bigger build file with not even more success to track it down. Even ran this build fie on a win32 box and a mac osx box and didn't work on both.
Sorry maybe I'm just to waisted due to the later hour and thereby not getting it, but otherwise I also could have been stumbled into a (already reported?) bug.
Shouldn' t the following test target produce the text 'Some text with two tokens: 1st Token followed by a 2nd Token' when applied to the move task context and get written into the file moved to?
<?xml version="1.0" encoding="utf-8" ?>
<project name="test" basedir="." default="test">
<property name="one" value="1st Token" />
<property name="two" value="2nd Token" />
<property name="text">Some text with two tokens: @@TOKEN_ONE@@ followed by a @@TOKEN_TWO@@</property>
<target name="test">
<echo msg="${one}" />
<echo msg="${two}" />
<echo msg="${text}" />
<echo file="template.txt">${text}</echo>
<move file="template.txt" tofile="text-with-tokens-replaced.txt">
<filterchain>
<replacetokens begintoken="@@" endtoken="@@">
<token key="TOKEN_ONE" value="${one}" />
<token key="TOKEN_TWO" value="${two}" />
</replacetokens>
</filterchain>
</move>
</target>
</project>