Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Cannot Reproduce
-
Affects Version/s: 3.0
-
Fix Version/s: Issues to be reviewed for 3.x
-
Component/s: Embedding
-
Labels:None
-
Number of attachments :
Description
The embedder is throwing an error while configuring the xdoclet-maven-plugin.
The error message I get is:
"on the command line, specify: '-DdummyExpression=VALUE' Cause: Class 'org.codehaus.classworlds.ClassRealm' cannot be instantiated"
In debugging, I noticed that the "dummyExpression" is being introduced in DefaultPluginManager.mergeMojoConfiguration, which takes two parameters (pomConfiguration, mojoDescriptor)
pomConfiguration (DOM)=
<configuration>
<tasks>
<ejbdoclet excludedtags="@version,@author" destdir="$
<fileset dir="src/main/java">
<include name="**/*Bean.java"/>
</fileset>
<utilobject destdir="${project.build.directory}
/generated-sources/xdoclet"></utilobject>
<mdb destdir="$
<localinterface destdir="${project.build.directory}
/generated-sources/xdoclet"/>
<localhomeinterface destdir="$
<remoteinterface destdir="${project.build.directory}
/generated-sources/xdoclet"/>
<homeinterface destdir="$
<deploymentdescriptor destdir="${project.build.directory}
/classes/META-INF"></deploymentdescriptor>
<jboss destdir="$
</ejbdoclet>
</tasks>
<classRealm/>
<generatedSourcesDirectory/>
<project/>
<sourceDirectory/>
</configuration>
mojoDescriptor =
org.apache.maven.plugin.descriptor.MojoDescriptor [role: 'org.apache.maven.plugin.Mojo', hint: 'org.codehaus.mojo:xdoclet-maven-plugin:1.0-alpha-2:xdoclet' realm: 'org.codehaus.mojo:xdoclet-maven-plugin']
what is returned is:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<!-- where did this come from?: -->
<classRealm implementation="org.codehaus.classworlds.ClassRealm">${dummyExpression}</classRealm>
<generatedSourcesDirectory implementation="java.lang.String">${project.build.directory}
/generated-sources/xdoclet</generatedSourcesDirectory>
<project implementation="org.apache.maven.project.MavenProject">$
</project>
<sourceDirectory implementation="java.lang.String">$
/src/main/java</sourceDirectory>
<tasks implementation="org.apache.tools.ant.Target">
<ejbdoclet excludedtags="@version,@author" destdir="$
<fileset dir="src/main/java">
<include name="**/*Bean.java"/>
</fileset>
<utilobject destdir="${project.build.directory}
/generated-sources/xdoclet"></utilobject>
<mdb destdir="$
<localinterface destdir="${project.build.directory}
/generated-sources/xdoclet"/>
<localhomeinterface destdir="$
<remoteinterface destdir="${project.build.directory}
/generated-sources/xdoclet"/>
<homeinterface destdir="$
<deploymentdescriptor destdir="${project.build.directory}
/classes/META-INF"></deploymentdescriptor>
<jboss destdir="$
</ejbdoclet>${tasks}</tasks>
</configuration>
The top-level stack trace is kind of misleading:
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: org.codehaus.mojo:xdoclet-maven-plugin. Reason: Unable to parse the created DOM for plugin configuration
If it helps, here is the original plugin config from my pom:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xdoclet-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>xdoclet</goal>
</goals>
<configuration>
<tasks>
<ejbdoclet excludedtags="@version,@author" destdir="${project.build.directory}
/generated-sources/xdoclet" ejbspec="2.0">
<fileset dir="src/main/java">
<include name="**/*Bean.java" />
</fileset>
<utilobject destdir="$
</utilobject>
<mdb destdir="${project.build.directory}
/generated-sources/xdoclet">
</mdb>
<localinterface destdir="$
<localhomeinterface destdir="${project.build.directory}
/generated-sources/xdoclet" />
<remoteinterface destdir="$
<homeinterface destdir="${project.build.directory}
/generated-sources/xdoclet" />
<deploymentdescriptor destdir="$
</deploymentdescriptor>
<jboss destdir="${project.build.directory}
/classes/META-INF" version="4.0">
</jboss>
</ejbdoclet>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
Issue Links
- depends upon
-
PLX-335
XDoclet plugin doesn't work anymore (Class 'org.codehaus.classworlds.ClassRealm' cannot be instantiated" error message)
-
Give me a sample project and I'll start fixing it.