I had this problem with JUnit. I forked the JVM and everything worked
as expected (maven.compile.fork=yes).

Hope this helps.
Dominik


-----Original Message-----
From: Andy Jefferson [mailto:[EMAIL PROTECTED] 
Sent: 24 July 2003 10:56
To: Maven Users List
Subject: NoClassDefFoundError : org/w3c/dom/Document


Hi,

I'm trying to add a postGoal to java:compile to run a JDO-enhancer to
some classes. In maven.xml I run xdoclet:jdodoclet as a preGoal. This
runs fine and generates the necessary .jdo files. It then compiles, and
then in my postGoal I try to run a java command - and get 
java.lang.NoClassDefFoundError: org/w3c/dom/Document

I have xml-apis (1.0.b2) in my dependencies, and in this jar there is
indeed org/w3c/dom/Document.class (in fact this class is also in JDK
1.4.1 which is in my path). Anyone experienced anything similar ?




The maven.xml is

<project default="jar"
    xmlns:jar="jar"
    xmlns:maven="jelly:maven"
    xmlns:j="jelly:core"
    xmlns:u="jelly:util">

  <!-- Run through xdoclet pre-processor to generate JDO descriptor -->
  <preGoal name="java:compile">
    <echo>XDoclet : Generation of JDO descriptors</echo>
    <attainGoal name="xdoclet:jdodoclet"/>
    <echo>XDoclet : JDO descriptors generated</echo>
  </preGoal>

  <!-- JDO-enable classes -->
  <postGoal name="java:compile">
    <echo>JDO-enabling classes</echo>
      <java classname="com.triactive.jdo.enhance.SunReferenceEnhancer">
        <classpath>
          <path refid="maven.dependency.classpath"/>
        </classpath>
        <arg line="${maven.build.dest}/net/ajsoft/jdo/MyClasses.jdo"/>
      </java>
    <echo>Classes are now JDO-enabled</echo>
  </postGoal>
</project>



FWIW The dependencies in project.xml is

<dependencies>
  <dependency>
    <id>log4j</id>
    <version>1.2.8</version>
  </dependency>
  <dependency>
    <groupId>xdoclet</groupId>
    <artifactId>xdoclet</artifactId>
    <version>1.2b4</version>
  </dependency>
  <dependency>
    <groupId>xdoclet</groupId>
    <artifactId>xdoclet-xdoclet-module</artifactId>
    <version>1.2b4</version>
  </dependency>
  <dependency>
    <groupId>xdoclet</groupId>
    <artifactId>xdoclet-jdo-module</artifactId>
    <version>1.2b4</version>
  </dependency>
  <dependency>
    <groupId>xdoclet</groupId>
    <artifactId>xdoclet-tjdo-module</artifactId>
    <version>1.2b4</version>
  </dependency>
  <dependency>
    <groupId>xdoclet</groupId>
    <artifactId>xjavadoc</artifactId>
    <version>1.0</version>
    <jar>xjavadoc-1.0.jar</jar>
  </dependency>
  <dependency>
    <groupId>tjdo</groupId>
    <artifactId>tjdo</artifactId>
    <version>2.0</version>
  </dependency>
  <dependency>
    <groupId>jdo</groupId>
    <artifactId>jdo</artifactId>
    <version>1.0</version>
  </dependency>
  <dependency>
    <groupId>jdo</groupId>
    <artifactId>jdori</artifactId>
    <version>1.0</version>
  </dependency>
  <dependency>
    <groupId>xerces</groupId>
    <artifactId>xerces</artifactId>
    <version>2.2.1</version>
  </dependency>
  <dependency>
    <groupId>xml-apis</groupId>
    <artifactId>xml-apis</artifactId>
    <version>1.0.b2</version>
  </dependency>
</dependencies>

-- 
Andy

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



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

Reply via email to