ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel Sebastien (BIL)" <Sebastien.N...@dexia-bil.com>
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
paths.

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

<!-- 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}"/>
</target>

Thank you in advance.

S├ębastien 


---------------------
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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message