I was thinking, assuming the <maven-ant> patch gets accepted, should we
amend the documentation for what to put into a projects build.xml file to be
something like this...

<!-- maven:start -->

<!-- ======================================================== -->
<!-- D E F I N E   A N T   T A S K
  -->
<!-- ======================================================== -->
<taskdef name="maven-ant" classname="org.apache.maven.ant.Ant">
    <classpath>
        <pathelement location="${lib.repo}/maven.jar"/>
    </classpath>
</taskdef>

<!-- ======================================================== -->
<!-- D E L E G A T O R S                                      -->
<!-- ======================================================== -->
<target name="maven:gump-descriptor">
  <maven-ant antfile="${maven.home}/plugins/core/build.xml"
target="gump-descriptor"/>
</target>

<target name="maven:maven-update">
  <maven-ant antfile="${maven.home}/plugins/core/build.xml"
target="maven-update"/>
</target>

...

Then we could add a section to the

http://jakarta.apache.org/turbine/maven/start/integrate.html

page that describes the common Maven generated properties and references
that are useful to developers - then they can just use and reference them in
their build.xml files without needing to understand the whole <maven-ant>
thing.

If the above seems OK with folks I'd be happy to submit a patch.

Whilst on the subject, if the above does seem OK, it could well be good for
${maven.home}/plugins/core/build.xml in the "compile" target to define a new
classpath reference something like

    <path id="maven.generated.classpath">
        <pathelement path="${maven.build.dest}"/>
        <path refid="maven.dependency.classpath"/>
    </path>


Dunno if I like the name 'maven.generated.classpath' but the idea being it'd
be useful to export the classpath required to run any java code that maven
has just compiled, using the dependency classpath and the build
destitnation. So then a projects build.xml using the above <maven-ant> stuff
could just run stuff as follows...


<target name="hello.world" depends="maven:compile">
    <java classname="org.apache.foo.Bar" fork="yes">
        <classpath refid="maven.generated.classpath"/>
    </java>
</target>


Again I'll send a patch for the above if folks think its a good idea.

James


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


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to