It seems to me the following sample code doesn't work. I mean original token string won't be replaced. <filter token="year" value="2000"/> <copy todir="${dest.dir}" filtering="true"> <fileset dir="${src.dir}"/> </copy> using properties file doesn't work either. <filter filtersfile="deploy_env.properties"/> Any comments? Thanks a lot. Jason
I got mine to work but I did do something a little different than you did. In mine I had an "includes" too. Is your token quoted with '@' in your file too? e.g. in my source file the DEBUG token is defined as @DEBUG@. Here's my example:
I would like to encourage folks to not use Ant's <filter> task, but rather nest a filterset inside the <copy> task. The <filter> task sets up a global filter which cannot be cleared and will be used on all operations where filtering is enabled - and doing it local to each task that needs it provides cleaner control.