如何与 maven 一起协调龙目岛和 JPAMetalModel 处理器
当 JPAMetaModelEntityProcessor 注释处理器在 maven 构建中激活时,如何使用龙目岛。
Maven config:
[...]
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArguments>
<processor>org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor</processor>
</compilerArguments>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
[...]
在构建过程中(mvn全新安装),MetaModel对象被正确生成,但似乎龙目岛注释处理器不再添加到Javac编译中。所有@Getter,@Setter,...不起作用。