ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: ?? Available Task ??
Date Fri, 30 Apr 2004 14:32:52 GMT
--- Anthony_Lapaso@bcbsil.com wrote:
[SNIP]
> I'm probably using the "available" task incorrectly.
> Basically, I want to
> set a property if a file whose name matches a
> pattern is found.
> 
> Here is what I have, which does not work:
> 
> 
> <available property="class.files.exist"
>            classpathref="classesDir"
>            file="test\hcsc\**\*_Trigger.class"/>
> 
> 
> I am trying to set the property if any file matching
> the "*_Trigger.class"
> pattern exists *anywhere* in the directory
> structures.

<available> was not designed with wildcards in mind...
that said, in this particular case, you could work
around something like this:

<pathconvert property="class.files.exist"
             setonempty="false"
             pathsep=" ">
  <fileset
dir="classesDirIfItIsASingleDirectoryAsItsNameImplies"
includes="test\hcsc\**\*_Trigger.class" />

</pathconvert>

HTH,
Matt


	
		
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

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


Mime
View raw message