Is there a way to check if a string is present in any of a set of files and
fail the build? I've got something now, but it requires copying the
files... which I don't like doing. Copying puts a bunch of "copying 1 file
to blah blah blah in my build output". Here's my current code:
<for param="currentCSSFile">
<path>
<fileset dir="${dir.out.css}">
<include name="**/*.css"/>
</fileset>
</path>
<sequential>
<copy file="@{currentCSSFile}" tofile="${tokenCheckFile}"
overwrite="true">
<filterchain>
<stripjavacomments/>
<linecontainsregexp>
<regexp pattern="@(.*?)@"/>
</linecontainsregexp>
</filterchain>
</copy>
<fail message="Found missed keyword substitution (@KEYWORD@)
in output file: @{currentCSSFile}">
<condition>
<length file="${tokenCheckFile}" when="greater"
length="0"/>
</condition>
</fail>
</sequential>
</for>
--
View this message in context:
http://www.nabble.com/Fail-if-any-of-many-files-contains-a-string-tp23973929p23973929.html
Sent from the Ant - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]