ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony_Lap...@bcbsil.com
Subject Re: ?? Available Task ??
Date Fri, 30 Apr 2004 15:02:17 GMT




Thanks,

Although a <fileset> cannot be nested in a <pathconvert>, your general idea
allowed me to solve the problem...

Thanks!!





                      "Matt Benson"
                      <gudnabrsam@yahoo        To:       "Ant Users List"
<user@ant.apache.org>                                                  
                      .com>                    cc:
                                               Subject:  Re: ?? Available Task
??                                                                
                      04/30/2004 09:32
                      AM
                      Please respond to
                      "Ant Users List"




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






**********
The information contained in this communication is confidential, private,
proprietary, or otherwise privileged and is intended only for the use of the
addressee.  Unauthorized use, disclosure, distribution or copying is strictly
prohibited and may be unlawful.  If you have received this communication in
error, please notify the sender immediately at (312)653-6000 in Illinois;
(972)766-6900 in Texas; or (800)835-8699 in New Mexico.
**********


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


Mime
View raw message