You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "chris.holman" <ch...@awltux.com> on 2010/10/28 14:28:43 UTC

Re: Fail if any of many files contains a string

I found this alternative solution. 
Putting it here for myself as much as anything else.


	<path id="usedByPathConvert" >
		<fileset id="conditionFileSet" dir="${dir.out.css}" includes="**/*.ccs">
			<containsregexp expression="@(.*?)@"/>
		</fileset>
	</path>

	<pathconvert refid="usedByPathConvert" property="filesFoundString" />

	<fail message="Found string in the following files: \n${filesFoundString}">
		<condition>
			<resourcecount refid="conditionFileSet" when="greater" count="0" />
		</condition>
	</fail>


-- 
View this message in context: http://ant.1045680.n5.nabble.com/Fail-if-any-of-many-files-contains-a-string-tp1354791p3240437.html
Sent from the Ant - Users mailing list archive at Nabble.com.

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