ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject exporting classpath references from inner Ant builds to outer Ant builds.
Date Wed, 22 May 2002 21:05:11 GMT
I'm moving various projects to Maven at the moment. One feature that'd make
my life much easier is if I could call Maven's Ant build file to compile
some stuff and generate the classpath to use to run sample programs using
its project.xml dependency information, then for this generated classpath to
be exported back to me for use in an outer build.

e.g. imagine if my projects build file looked like this...

<project name="Foo" basedir=".">
    <property file="${user.home}/" />
    <property file="" />
    <property file="" />

    <target name="maven:compile">
        <!-- call Maven to compile things and export the classpath -->
        <ant antfile="${maven.home}/build-maven.xml" target="compile"/>

    <target name="foo" depends="maven:compile">
        <java classname="org.apache.commons.jelly.Jelly">
            <pathelement path="${}"/>

            <!-- reuse the classpath created inside maven's build -->
            <path refid="maven.dependency.classpath"/>

This is kinda the opposite way around for the <ant> targets
inheritRefs="true" - I guess I want to be able to use an exportRefs="true"
for references to be exported from the called Ant project to the calling Ant
project. This feature would also help making the Maven plugins a bit easier
too I should think.

Anyone any comments on whether this seems reasonable or if I've missed
something? I'm happy to investigate further and have a go at creating a
patch for Ant; I'd just like a sanity check before I head off in this


Do You Yahoo!?
Get your free address at

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

View raw message