更新时间:2022-06-13 01:20:25
正如Chrylis所建议的那样,使用该插件时,应将带有Lombok批注的所有类放入src/main/lombok
中.它的使用页面上明确记录.
As Chrylis suggested, you ought to place any classes with Lombok annotations into src/main/lombok
when using that plugin. This is clearly documented on its usage page.
还有一个示例项目在这里,您可以看到如何在src/main/java
中放置没有Lombok注释的普通Java类,并在src/main/lombok
中放置Lombok目标.
There is also a sample project where you can see how plain Java classes without Lombok annotations are placed in src/main/java
and the Lombok targets in src/main/lombok
.
只需按照说明进行操作,就可以使用Maven Compiler插件了.至于AspectJ,这取决于您要如何编织方面(编译时,二进制编织,加载时间)以及这些方面是驻留在相同模块中还是在另一个模块中.
Just follow the instructions and you should be fine with regard to Maven Compiler plugin. As for AspectJ, it depends on how you want to weave your aspects (compile time, binary weaving, load time) and whether the aspects reside in the same or another module.