The ant replace task i开发者_运维百科s not like copy task which have a overwrite property, copy task can copy files that modifytime is changed.
How can I make replace task just deal with files be changed in copy task? or save a timestamp somewhere, let replace task just deal with files which modifytime is after the timestamp.
Try this :
<replace dir="${dir}" value="that" token="this">
<include name="**/*.txt"/>
<date datetime="${timestamp}" when="before"/>
</replace>
More infos :
http://ant.apache.org/manual/Types/fileset.html http://ant.apache.org/manual/Types/selectors.html#dateselect http://ant.apache.org/manual/Tasks/replace.html
精彩评论