ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <gil...@maksimo.de>
Subject Problems with <ant antfile..> and <java>
Date Wed, 22 Sep 2010 16:47:34 GMT

My workflow (Env : ant1.7.1,sun jdk1.6.0_17,windows)
dynamically creates an antfile.

The antfile has nothing special, only a <java> task and
some <echo> for logging purposes.

<java classname="..." resultproperty=".." outputproperty=".."
 resultproperty=".." failonerror="true">
 <arg value="some arg"/>
 <arg value="foobar.xsd"/>
 <arg value="foobar.xsd"/>
 <classpath>
  <fileset dir="path/to/generated/antfile">
   <includes="*.jar"/>
  </fileset>
</java>


foobar.xsd resides under path/to/generated/antfile,
means =
/path/to/generated/antfile
 antfile.xml
 foobar.xsd
 ...

The generated antfile has to be called from another
antscript, but with =

<ant antfile="path/to/generated/antfile/anfile.xml" inheritall="false"
 dir="path/to/generated/antfile"/>

i get a java.io.FileNotFoundException for <arg value="foobar.xsd"/>
whereas running the generated antfile standalone just works fine.

Even tried with =
<ant antfile="path/to/generated/antfile" inheritall="false"
 dir="path/to/generated/antfile">
 <property name="user.dir" value="path/to/generated/antfile"/>
</ant>

but that's nonsense and didn't work either.

Any ideas beside an ugly =
<exec dir="path/to/generated/antfile" executable="java".../>

??

Regards, Gilbert

















---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message