| We are trying to migrate our project to Java 9. We use hibernate-jpamodelgen version 5.2.12. The build fails with:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project core-data: Fatal error compiling: java.lang.NoClassDefFoundError: javax/annotation/Generated: javax.annotation.Generated -> [Help 1]
It looks like the issue is coming from hibernate-jpamodelgen that makes use of this annotation. javax.annotation.Generated is part of java.xml.ws.annotation which have been marked for removal. javax.annotation.Generated alternative seems to be javax.annotation.processing.Generated, but the latter only exist in JDK 9. Because both classes can't be used with JDK 8, project vavr decided to remove it https://github.com/vavr-io/vavr/pull/2181. I think Hibernate should do the same until the project definitely moves to Java 9. |