ant-user mailing list archives

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

-----Original Message-----
Sent: Thursday, July 10, 2008 3:20 PM
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">
    <fileset dir="Y:/test" includes="**/*.conf">
      <contains text="foobar" casesensitive="no" />

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

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message