ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: Simple (?) question about "<available>"
Date Fri, 20 May 2005 20:45:54 GMT
In Ant 1.7 you will have other methods at your
disposal.  For now:

<pathconvert property="ZIP_FILE_EXISTS"
             setonempty="false">
  <path>
    <fileset dir="${DIR}" includes="*.zip"
             excludes="not_this_one.zip" />
  </path>
</pathconvert>

does what you want.

HTH,
Matt

--- Rich Wagner <rich.wagner@savaJe.com> wrote:
> Hi,
> 
> I'm having trouble specifying a particular
> "available" task.  Here's 
> what I want, though Ant isn't happy with it:
> 
>     <target name="check_for_zip_file">
>         <available property="ZIP_FILE_EXISTS">
>             <filepath>
>                 <include name="${DIR}/*.zip"/>
>                 <exclude
> name="${DIR}/not_this_one.zip"/>
>             </filepath>
>         </available>
>     </target>
> 
> Ant says:  "The <path> type doesn't support the
> nested 'include' element."
> 
> OK, but can anyone tell me how to write what I want?
>  Essentially, set 
> the ZIP_FILE_EXISTS property if there's at least one
> match to 
> "${DIR}/*.zip", though NOT counting
> "${DIR}/not_this_one.zip"...
> 
> Thanks in advance,
> Rich Wagner
> 
> 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message