You could use <loadfile> to read the file into a property then use the
contains <condition> in the condition task to check for the string.

If the file is big then you probably want to use a filterchain to subset
it.

-Alec

-----Original Message-----
From: Rob Wilson [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 08, 2007 1:51 PM
To: Ant Users List
Subject: Fail if file does not contains a string?

Is it possible to fail ant if a file does not contain a string?

Cheers,
Rob.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to