ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zacke <za...@MailAndNews.com>
Subject Path problems
Date Fri, 10 Nov 2000 15:18:18 GMT
Hi,

I would like to add a path to my source path if I don't find a specific jar 
file.
I would like to do something like this:


<-- Add the sourcepath to moduleA if moduleA.jar is missing.
<path id="source.path">
  <pathelement location="${root.dir}/moduleA/src" unless="moduleA" />
</path>

<!-- Check to see what dependencies jar files are available -->
<target name="check_for_dependencies">
  <available property="moduleA" file="${root.dir}/moduleA/distr/moduleA.jar" 
/>     
</target>

<!-- Compiles the source code -->
<target name="compile" depends="prepare,check_for_dependencies">
  <javac srcdir="${src}" destdir="${build}">
    <classpath refid="class.path" />
    <src refid="source.path" />
  </javac>
</target>


But this will not work because "unless" will not work in "pathelement".
Any suggestions ?

Regards
Zacke


Mime
View raw message