ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Roll <gr...@ServiceIntelligence.com>
Subject RE: grep functionality
Date Wed, 20 Nov 2002 22:17:15 GMT
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:BoxwellDL@C-IV.org]
Sent: Wednesday, November 20, 2002 11:04 AM
To: ant-user@jakarta.apache.org
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:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message