ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zart Colwing <za...@wanadoo.fr>
Subject how to test existance of file based on pattern
Date Wed, 20 Mar 2002 21:22:30 GMT
I have the following need that I couldn't work out by myself so far:
- In order to fire a target I need to make sure at least one Test*.java 
exist anywhere in my test source hierarchy.

Naively I tried the following rule, but without success because 
<available/> is only capable of testing the existence of a single well 
know file at once. <available/> does not support file pattern !

<target name = "test_cases.exists">
	<!-- check that at least one Test*.java exist anywhere in the test 
source hierarchy -->
	<available file = "${src.test}/**/Test*.java" type = "file" 
property = "test_cases_exists"/>
</target>

Any idea, any body.

Thanks
ZC.


--
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