hyperjaxb3 icon indicating copy to clipboard operation
hyperjaxb3 copied to clipboard

Not compiling under Java 10

Open CryptoFox967 opened this issue 6 years ago • 5 comments

I' tried using hyperjaxb at work where java 10 is installed.

When I try to add it to my pom file the following error appears:

[INFO] --- maven-hyperjaxb3-plugin:0.6.1:generate (default) @ my-model --- [WARNING] The POM for org.glassfish.jaxb:jaxb-runtime:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.glassfish.jaxb:jaxb-xjc:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] Error injecting: org.jvnet.hyperjaxb3.maven2.Hyperjaxb3Mojo java.lang.NoClassDefFoundError: com/sun/xml/bind/api/ErrorListener

The same error happens when I try to compile the current github master with "mvn compile".

CryptoFox967 avatar Apr 18 '18 19:04 CryptoFox967

Same problem under java 11 with Hibernate 5.3.7.

Any progress on that ?

lgwozniak avatar Dec 31 '18 14:12 lgwozniak

Same here! Any update?

alejandro-ordonez avatar Dec 12 '19 22:12 alejandro-ordonez

Same problem under java 11

Haylemicheal avatar Nov 25 '21 10:11 Haylemicheal

I found a solution for these warnings. In java 8 the tools.jar is included in the JDK, but in java version 8+ it is removed. In the pom file of the hyperjaxb3-maven-plugin version 0.6.1, the JAXB version 2.2.11 is used. That JAXB version needs tools.jar. So I solved it by cloning the hyperjaxb3-maven-plugin from GitHub and modifying the versions of the JAXB to 2.3.0, and I build it by myself. Finally, I use the snapshot version of the plugin in my project.

Haylemicheal avatar Jan 17 '22 09:01 Haylemicheal

Here is the modified version of the repo https://github.com/Haylemicheal/hyperjaxb3.git

Haylemicheal avatar Jan 17 '22 09:01 Haylemicheal

Hi @Haylemicheal @CryptoFox967 @alejandro-ordonez and @lgwozniak

Hyperjaxb3 has been merged last year into jaxb-tools repository (former maven-jaxb2-plugin).

It now supports jdk8 and is tested against jdk11 and jdk17.

It also supports jakarta in it's latests version.

You can check the migration guide to locate the new artifacts.

Regards

laurentschoelens avatar Jul 28 '24 07:07 laurentschoelens