hyperjaxb3
hyperjaxb3 copied to clipboard
Not compiling under Java 10
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".
Same problem under java 11 with Hibernate 5.3.7.
Any progress on that ?
Same here! Any update?
Same problem under java 11
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.
Here is the modified version of the repo https://github.com/Haylemicheal/hyperjaxb3.git
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