我正在使用Selma来使用Lombok的注释来映射pojo。不幸的是,它似乎没有开箱即用:
是否有人能够重新配置注释处理器以在同一个maven模块中使用这两个工具?
答案 0 :(得分:1)
我能够用:
生成Lombok + Selma类在你的pom.xml中:
<plugins>
<build>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<defaultOutputDirectory>
${project.build.directory}/generated-sources/selma
</defaultOutputDirectory>
<processors>
<processor>lombok.launch.AnnotationProcessorHider$AnnotationProcessor</processor>
<processor>fr.xebia.extras.selma.codegen.MapperProcessor</processor>
</processors>
</configuration>
<executions>
<execution>
<id>process</id>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>fr.xebia.extras</groupId>
<artifactId>selma-processor</artifactId>
<version>0.15</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
然后运行:mvn generate-sources