ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <Gilbert.Reb...@huk-coburg.de>
Subject RE: Ant task to find in files
Date Thu, 10 Jul 2008 13:49:11 GMT
 

-----Original Message-----
From: Ext.Manish.Shah@tietoenator.com
[mailto:Ext.Manish.Shah@tietoenator.com] 
Sent: Thursday, July 10, 2008 3:20 PM
To: user@ant.apache.org
Subject: Ant task to find in files

/*
Hi there,

I'd like to seach the files in a fileset and fail my build if any file
contains a certain string.

Is there any functionality in Ant that can do this? I've seen the
Replace task, but all I want is a Find task.
*/

maybe something like =

<pathconvert property="target.found" pathsep=" " setonempty="false">
  <path>
    <fileset dir="Y:/test" includes="**/*.conf">
      <contains text="foobar" casesensitive="no" />
    </fileset>
  </path>
</pathconvert>

<fail if="target.found">Oops, found ... </fail>


Regards, Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message