I think you should be able to make use of <exec> to write a shell script that would perform the grep functions you are seeking. If a match is found you could return a error code and stop the build from continuing...
Greg Roll -----Original Message----- From: Daniel L. Boxwell [mailto:[EMAIL PROTECTED]] Sent: Wednesday, November 20, 2002 11:04 AM To: [EMAIL PROTECTED] Subject: grep functionality I am looking for functionality in ANT that will allow me to define a list of forbidden strings and then grep for them throughout my source tree. In particular, I would like to be able to search for strings such as - System.out.println() - connection.commit() - etc. . . Checkstyle will allow me to look for forbidden instantiations such as java.lang.Boolean, but that doesn't really solve my problem. . . I had originally thought of using the ReplaceRegExp task, but this task and all other regular expression based tasks I have found seem to be replacement oriented. Ideally I would have the ability to fail a build if a forbidden string crept into the code. Any suggestions would be appreciated. I hope that I am just overlooking something simple! Thanks, --Dan -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>