dev@jaxb.java.net

Re: JaxB maven plugin issue

From: Pavel Bucek <Pavel.Bucek_at_Sun.COM>
Date: Thu, 28 Jan 2010 01:26:22 +0100

Hello Sachin,

can you please create simple maven project which will reproduce this
issue? And.. have you tried that with clean local maven repository?

Thanks,
Pavel

Sachin Parikh wrote:
> 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 <http://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 <http://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