ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Ant task with custom classpath?
Date Fri, 05 Jun 2009 08:29:40 GMT

Would it be possible to call Ant task with different classpath than the
one actual build is running with ?
Following should give you an idea:
<ant antfile="secondbuild.xml" target="run">
  <classpath><!-- this is not possible, but ilustrating the problem -->
    <pathelement location="ant-contrib.jar"/>

I have attempted to use taskdef to archieve this, but it does not seem
to work:
<path id="custom.classpath">
    <fileset dir="${env.ANT_HOME2}/lib">
      <include name="**/*.jar"/>
      <include name="**/**/*.jar"/>
      <pathelement location="ant-contrib.jar"/>

<taskdef name="runAnt"

This defines the task, but secondbuild.xml invoked with this new task
does not have access to tasks defined in 'custom.classpath'.

Is there any way to archive this ?
The motivation scenario is antscript used as an command interface
between two systems. Currently, they both have to use the same ant version and

Thanks for any hints.

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

View raw message