ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacopo Cappellato <>
Subject replacing tokens in strings
Date Wed, 04 Feb 2009 11:00:19 GMT
Hi all,

I am trying to replace all occurrences of a given token in a file  
while copying it.
I am using the task:

<copy file="${build.dir}/version.txt" toFile="${dist.dir}/version.txt">
<filter token="DATE" value="${TODAY}"/>

Everyting works fine if the token in the file are in the form of  
@DATE@ and are *separated* by other strings.
It doesn't work if the token is not separated by other strings, for  
"@DATE@_suffix" is not replaced, while "today is @DATE@" it is.
Is there a workaround?

View raw message