ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Darrell DeBoer <>
Subject Re: [GUMP] Build Failure - myrmidon-api [XDoclet problems?]
Date Mon, 10 Jun 2002 10:21:19 GMT

I've been playing around with fixing the Myrmidon Gump runs, and I'm pretty 
sure that it's a general problem with running XDoclet tasks under gump. 

The following simple build file <taskdef>s xdoclet.DocletTask, and runs a 
template against a single file. This file runs fine when run with an empty 
classpath, but fails with the XDoclet jars in the system classpath. (The test 
file uses files in the myrmidon tree).

<project name="xdoclet-test" default="main">
    <target name="main">
        <delete file="api/build/conf/myrmidon-api/ant-roles-test.xml"/>
        <path id="xdoclet.classpath">
            <fileset includes="*.jar" dir="tools/xdoclet"/>

        <taskdef classname="xdoclet.DocletTask" name="xdoclet" 

        <xdoclet destdir="api/build/conf/myrmidon-api">
            <fileset dir="api/src/java" includes="**/"/>

This happens whether or not ${build.sysclasspath} == "only", and would seem to 
prevent any project using XDoclet from being built with Gump (which relies on 
setting the system classpath for all dependencies).

I think the XDoclet developers are aware of this behaviour:
    public DocletTask() throws BuildException
        try {
            classpath = ((AntClassLoader) 

            System.setProperty("xdoclet.class.path", classpath);
        catch (ClassCastException e) {
            throw new BuildException("xdoclet.jar should not be on the system 
classpath when starting Ant. It should be on a path passed to the <taskdef> 
using classpath or classpathref.");

I haven't yet looked for the root cause of the problem within the DocletTask. 
Has anyone ever seen anything like this, where build works with an empty 
classpath, but not when jars are included in the system classpath? DocletTask 
has dependencies on a bunch of other jars (also included in the classpath), 
and I think it also uses the new "DynamicElement" functionality, which I 
suppose may still have a few un-ironed wrinkles.


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

View raw message