Here my related {{pom.xml}} snippet:
{code:xml}<properties> <java.version>11</java.version> <lombok.version>1.18.24</lombok.version> <org.mapstruct.version>1.5.2.Final</org.mapstruct.version> <hibernate-reactive.version>1.1.8.Final</hibernate-reactive.version> <hibernate-jpamodelgen.version>6.1.3.Final</hibernate-jpamodelgen.version> </properties>
<dependencies> <dependency> <groupId>org.hibernate.reactive</groupId> <artifactId>hibernate-reactive-core</artifactId> <version>${hibernate-reactive.version}</version> </dependency> <dependency> <groupId>org.hibernate.orm</groupId> <artifactId>hibernate-jpamodelgen</artifactId> <version>${hibernate-jpamodelgen.version}</version> </dependency> <dependency> <groupId>org.mapstruct</groupId> <artifactId>mapstruct</artifactId> <version>${org.mapstruct.version}</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> </dependencies>{code}
As you can see, I'm using {{lombok}} + {{mapstruct}} + {{japmodelgen}}.
My problem is that metamodel is not generated but I'm not getting any reason or message about. It seems it's failing silently.
My entity class is annotated using {{javax.persistence.*}} annotations:
{code:java}import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table;
@Entity @Table(name = "GITTBQDCF") public class QdCF { //... }{code}
I've also tested with several configurations of {{maven-compiler-plugin}}:
However, static meta model class `QdCF_` is not generated:
{code:xml}<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.10.1</version> <configuration> <release>${java.version}</release> <showWarnings>true</showWarnings> <verbose>true</verbose> <annotationProcessorPaths> <annotationProcessorPath> <groupId>org.hibernate.orm</groupId> <artifactId>hibernate-jpamodelgen</artifactId> <version>${hibernate-jpamodelgen.version}</version> </annotationProcessorPath> <annotationProcessorPath> <groupId>org.projectlombok</groupId> <version>${lombok.version}</version> <artifactId>lombok</artifactId> </annotationProcessorPath> <annotationProcessorPath> <groupId>org.projectlombok</groupId> <version>0.2.0</version> <artifactId>lombok-mapstruct-binding</artifactId> </annotationProcessorPath> <annotationProcessorPath> <groupId>org.mapstruct</groupId> <artifactId>mapstruct-processor</artifactId> <version>${org.mapstruct.version}</version> </annotationProcessorPath> </annotationProcessorPaths> </configuration> </plugin>{code}
After having buit:
{noformat}$ mvn compile ..... ..... [WARNING] system modules path not set in conjunction with -source 11 [INFO] Hibernate JPA 2 Static-Metamodel Generator 6.1.3.Final [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 20.099 s [INFO] Finished at: 2022-10-04T10:43:16+02:00 [INFO] -------------------------------------------------------------------------{noformat}
I’ve only been able to get above message: {{[INFO] Hibernate JPA 2 Static-Metamodel Generator 6.1.3.Final}}. Nothing more. I don't quite figure out what I'm doing wrong...
Any ideas?
Could I enable some kind of additional helping jpamodelgen logging?
Now, I’ve also tried to use: {{hibernate-enhance-maven-plugin}}, but it keeps without generating metamodel. I’ve created this [repository|https://gitlab.com/jeusdits/jpamodelgen] with my code in order to you could reproduce behavior.
{noformat}<plugin> <groupId>org.hibernate.orm.tooling</groupId> <artifactId>hibernate-enhance-maven-plugin</artifactId> <version>${hibernate-jpamodelgen.version}</version> <executions> <execution> <configuration> <failOnError>true</failOnError> <enableLazyInitialization>true</enableLazyInitialization> <enableDirtyTracking>true</enableDirtyTracking> <enableAssociationManagement>true</enableAssociationManagement> </configuration> <goals> <goal>enhance</goal> </goals> </execution> </executions> </plugin> {noformat} |
|