maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Anderson <benander...@benanderson.us>
Subject running the project out of maven.xml
Date Wed, 20 Oct 2004 18:24:43 GMT
Hi,
I'd like to take advantage of the classpath which maven uses to run my 
project.  I've tried to solutions:

1.        <ant:echo>
            ${us.benanderson.rpc.Assignment3.main(null)}
        </ant:echo>
This gives no output (good or bad)

2.   <ant:java classname="us.benanderson.rpc.Assignment3"
                  classpath="${basedir}/target/classes"
                  classpathref="maven.dependency.classpath"/>

This makes a little more sense, but for some reason I'm getting this output:

    [java] [ERROR] java.lang.NoClassDefFoundError: org/w3c/dom/Document

This is baffling me because I have this dependency specified:

        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xmlParserAPIs</artifactId>
            <version>2.0.2</version>
        </dependency>

I'm looking at this jar and it definitely contains 
org.w3c.dom.Document.  I know it's using maven.dependency.classpath, 
because it'll give me different errors depending on what dependencies I 
specifiy.

I'll list all my files, if someone ambitous wants to glance over them.
Thanks,
Ben

project.xml
---------------
<project>
    <pomVersion>3</pomVersion>
    <id>ass3</id>
    <name>ass3</name>
    <groupId>ass3</groupId>
    <currentVersion>1.0</currentVersion>
    <dependencies>
        <dependency>
            <groupId>jaxrpc</groupId>
            <artifactId>jaxrpc</artifactId>
            <jar>jaxrpc.jar</jar>
        </dependency>
        <dependency>
            <groupId>axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.1</version>
        </dependency>
        <dependency>
            <groupId>dom4j</groupId>
            <artifactId>dom4j</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xerces</artifactId>
            <version>2.4.0</version>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.6.2</version>
        </dependency>
        <dependency>
            <groupId>jaxp</groupId>
            <artifactId>jaxp</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>sax</groupId>
            <artifactId>sax</artifactId>
            <version>2.0.1</version>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>2.0.2</version>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xmlParserAPIs</artifactId>
            <version>2.0.2</version>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>commons-discovery</groupId>
            <artifactId>commons-discovery</artifactId>
            <version>0.2</version>
        </dependency>
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>2.5.1</version>
        </dependency>
    </dependencies>
    <build>
        <sourceDirectory>src</sourceDirectory>
    </build>
</project>

maven.xml
---------------
<project default="jar:jar"
         xmlns:j="jelly:core"
         xmlns:ant="jelly:ant">
    <goal name="echo">
        <ant:echo>
            ${us.benanderson.rpc.Assignment3.main2()}
        </ant:echo>
        <ant:java classname="us.benanderson.rpc.Assignment3"
                  classpath="${basedir}/target/classes"
                  classpathref="maven.dependency.classpath"/>
    </goal>
</project>

project.properties
----------------------
maven.repo.remote=http://www.ibiblio.com/maven, 
http://www.bluesunrise.com/maven, http://mevenide.codehaus.org/repository 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message