ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: How to check availability of a set of files
Date Wed, 30 Nov 2005 18:46:41 GMT
--- David <achepati67@yahoo.es> 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
>
file="${middlegen.destDir}/com/amena/cac/domain/*.hbm.xml"/>
>    </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?
;)

HTH,
Matt

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



	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
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