Re: AW: Fail build when 'replace' task cannot find expected number oftokens

2008-02-05 Thread Prashant Reddy
Ok my bad. replace does change the timestamp if the token is replaced. I was creating the source.txt just before the replace, which also gave temp.txt same timestamp.

Re: AW: Fail build when 'replace' task cannot find expected number oftokens

2008-02-05 Thread Prashant Reddy
Thanks for a good idea. nice and simple. Quick check with following build.xml reveals that the replace does not modify timestamp even when token is replaced. However this approach will not catch scenario where 1 instance was replaced when 2 were expected.

AW: Fail build when 'replace' task cannot find expected number oftokens

2008-02-05 Thread Knuplesch, Juergen
Addition: You could also use the Task togeteher with And of course use the fail-Task to make the Build fail -- Jürgen Knupleschwww.icongmbh.de icon Systemhaus GmbHTel. +49 711 806098-275 Sophienstraße 40 D-70178 Stuttgart

AW: Fail build when 'replace' task cannot find expected number oftokens

2008-02-05 Thread Knuplesch, Juergen
Maybe you could copy the file without changing of the timestamp (attribute preservelastmodified). Then do the replace on your file. Then test via if a change happened. Delete the copy This will only work, if replace does not change the timestamp, in case of no changes. Just an idea... -- Jür