Hi,
I am getting an error with the new Maven-jaxb Plugin v1.1.1 and wanted to
find out the fix for that.
The issue is: I was using JaxB 2.1 with maven plugin v1.1 and everything was
working fine. With the release of v1.1.1, Maven downloaded the plugin
successfully to my repository but when it tried to make the build, i get
this error:
*06:00:57]:* [INFO] artifact com.sun.tools.xjc.maven2:maven-jaxb-plugin:
checking for updates from maven2-repository.dev.java.net
*[06:00:58]:* [INFO] artifact com.sun.tools.xjc.maven2:maven-jaxb-plugin:
checking for updates from maven-repository.dev.java.net
*[06:00:58]:* Downloading:
http://download.java.net/maven/1/com.sun.tools.xjc.maven2/poms/maven-jaxb-plugin-1.1.1.pom
*[06:00:58]:* Downloading:
http://download.java.net/maven/2/com/sun/tools/xjc/maven2/maven-jaxb-plugin/1.1.1/maven-jaxb-plugin-1.1.1.jar
*[06:00:58]:* 9K downloaded
*[06:00:58]:* [INFO] [clean:clean]
*[06:00:59]:* [INFO] [jaxb:generate {execution: default}]
*[06:00:59]:* [FATAL ERROR] com.sun.tools.xjc.maven2.XJCMojo#execute()
caused a linkage error (java.lang.NoClassDefFoundError) and may be
out-of-date. Check the realms:
*[06:00:59]:* [FATAL ERROR] Plugin realm =
app0.child-container[com.sun.tools.xjc.maven2:maven-jaxb-plugin]
I have tried all different permutations with my pox files and still could
not resolve the issue. If you could throw any light on this, i will really
appreciate.
Here's the Pom snippet:
<dependency> <groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId> <version>2.2</version> </dependency>
<plugin> <groupId>com.sun.tools.xjc.maven2</groupId>
<artifactId>maven-jaxb-plugin</artifactId> <!-- <version>1.1</version> -->
<executions> <execution> <goals> <goal>generate</goal> </goals> </execution>
</executions> <configuration> <extension>true</extension> </configuration>
</plugin>
If I uncomment the version node, the code compiles fine.
Thanks
Sachin