Re: Fail build when 'replace' task cannot find expected number of tokens

2008-02-21 Thread Prashant Reddy
I solved this problem like this, on advice of another colleague. * the output of the tasks * Look for occurrences of the string "Replaced 0 occurrences" in the recorded output * If above said pattern occurs fail the build. Of course this approach still does not cover usecase when you are exp

Fail build when 'replace' task cannot find expected number of tokens

2008-02-05 Thread Prashant Reddy
Hello ANT users, Using ANT 1.6.5, a build XML i am using makes use of task to replace certain token in a bunch of Javascript files. I would like the build to fail when the replace of a token fails, so that when someone changes the source file such that does not find any tokens to replace; the i