It's always worth forking java whenever you get a message about a class not found in the xml packages.

Andy Jefferson wrote:

After investigating further I have set up an Ant build.xml and the
following runs *correctly* in Ant

<!-- Classpath. -->
<path id="class.path">
 <pathelement path="target/classes"/>
 <pathelement location="/usr/local/tjdo/lib/tjdo.jar"/>
 <pathelement location="/usr/local/jdo/src/jdo.jar"/>
 <pathelement location="/usr/local/jdo/src/jdori.jar"/>
 <pathelement
location="/usr/local/maven/repository/xml-apis/jars/xml-apis-1.0.b2.jar"/>
 <pathelement
location="/usr/local/maven/repository/xerces/jars/xerces-2.2.1.jar"/>
</path>

<!-- JDO-enhance -->
<target name="enhance" depends="compile">
 <java classname="com.triactive.jdo.enhance.SunReferenceEnhancer"
   failonerror="true"
   classpathref="class.path">
   <arg line="target/classes/net/ajsoft/jdo/MyClasses.jdo"/>
 </java>
</target>



Yet the Maven translated version

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


fails with that "NoClassDefFoundError : org/w3c/dom/Document"

I've also tried adding
<properties><classloader>root</classloader></properties>
and this makes no difference.


There seems to be an issue with class-loading in Maven







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



Reply via email to