ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: How to check availability of a set of files
Date Wed, 30 Nov 2005 18:46:41 GMT
--- David <> wrote:

> Dear Members,
>   Is it possible to check the availability of the
> set of generated files, with a given pattern?
>   The following solution doesn't work:
>    <target name="check-hbm.xml-present">
>   <condition property="hbm.xml.present">
>    <and>
>     <available file="${middlegen.destDir}"
> type="dir"/>
>     <available
>    </and>
>   </condition>
>  </target>
>   it expect on the file attribute a file name or
> directory. I whould like to check the output
> directory exist and also the generated set of
> *.hbm.xml files on a given subfolder.
>   Do you have any idea about how to solve this
> problem?
>   Thanks in advance,
>   David

David: the availability of a fileset doesn't really
make sense, as a fileset can only contain files that
exist and are therefore "available" (by the task's
definition, anyway).  I haven't used middlegen, but if
it is guaranteed to create one Hibernate xml file
per... some other file, you could probably use the
uptodate task to verify that all expected target files
exist.  Also, once you have the relevant check in
place for your target files, you could probably omit
the check for their parent directory, don't you think?


> ---------------------------------
>  Yahoo! Music Unlimited - Access over 1 million
> songs. Try it free.

Yahoo! Mail - PC Magazine Editors' Choice 2005

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message