I'm starting a maven/hibernate project using eclipse, and I'm having an issue with my metamodel classes.
I'm getting a red x for lines dealing with the @Generated annotation:
import javax.annotation.Generated;
@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor")
I've reviewed the documentation and it describes an option addGeneratedAnnotation:
If set to true the processor will add the @Generated to the generated Java source file. Adding this annotation using JDK 5 will cause a compilation error. In this case set the flag to false. The default for this option is true
where do I set that option in eclipse? In the run config? I tried that, doing just a maven compile, but that did not fix it. Which maven goal will generated new metamodel classes.
I'm pretty sure I have the build path and factory path set up right. I am using java 9.
I have my pom.xml file to include the following
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>5.3.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.3.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.3.1.Final</version>
</dependency>
update
I tried running package and compile in maven, but was getting the version error 52.0/53.0.
has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
I was able to resolve by setting compiler level and project facet java level to 1.8.
Is there a way to get this set up with later versions?
JAVA_HOMEpointing to?openjdk version "10.0.2" 2018-07-17