ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
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}/build.properties" />
    <property file="build.properties" />
    <property file="project.properties" />

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

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

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


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
direction.

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message