ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel Sebastien (BIL)" <>
Subject Multiple directory existence checking
Date Tue, 11 May 2004 14:12:28 GMT
Hello everyone,

I am new to this list. I did not find the solution to my problem in the FAQ or archive. It
is : how to check the existence of several directories using a base root directory and relative

<target name="checkSources">
  <property name="rootDirectory" value="/PROD/ant/workingDir/"/>	<!-- is the root
directory -->
  <property name="webJavaCompileFrom" value="relativeDir1:relativeDir2:relativeDir2"/>
<!-- relativeDirN is a directory containing Java source. It is a relative path. Thus rootDirectory
+ relativeDirN is an absolute path to the dircetory -->
  <!-- HOW TO use available task -->

<!-- Here i would like to compile Java source only if $rootDirectory/relativeDir1 AND $rootDirectory/relativeDir2
AND $rootDirectory/relativeDir3 ALL exist. Namely how to set the "sourcesPresent" used below
<target name="webJavaCompile" depends="checkSources" if="sourcesPresent">
 <javac srcdir="${webJavaCompileFrom}" destdir="${webJavaCompileTo}"/>

Thank you in advance.


An electronic message is not binding on its sender.  
Any message referring to a binding engagement must be confirmed in writing and duly signed.

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

View raw message