ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@multitask.com.au
Subject Re: exporting classpath references from inner Ant builds to outer Ant builds.
Date Thu, 23 May 2002 00:29:38 GMT

We do have a copy of the Ant task in CVS at the moment, it's just not being
used. Ant will happily 'import' references from called projects, but
there's no way at the moment to 'export' them.

We definitely need a better way of doing this...
--
dIon Gillard, Multitask Consulting
Work:      http://www.multitask.com.au
Developers: http://adslgateway.multitask.com.au/developers


                                                                                         
                             
                    "James Strachan"                                                     
                             
                    <james_strachan@ya       To:     <ant-dev@jakarta.apache.org>
                                     
                    hoo.co.uk>               cc:                                      
                                
                                             Subject:     exporting classpath references from
inner Ant builds to      
                    05/23/02 07:05 AM         outer Ant builds.                          
                             
                    Please respond to                                                    
                             
                    "Ant Developers                                                      
                             
                    List"                                                                
                             
                                                                                         
                             
                                                                                         
                             




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>






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