I am trying to use the Lombok Maven Plugin to ensure the correct creation of Javadocs when using Lombok.
Lombok Maven introduces a new code generation goal, just pri
I tried to use the solutions from the other answers, but IntelliJ would still mark my source files from src/main/java as duplicated. So I just decided to get rid of the delombok's content after compilation. In the end that folder only server as an intermediary stage for compilation (in my case it was required to use lombok with AspectJ compiler) and there's no real need to keep it. I did it by configuring an additional execution of the clean plugin which would specifically target the delombok folder.
Your POM should contain
${project.build.directory}/generated-sources/delombok
org.projectlombok
lombok-maven-plugin
1.16.16.0
generate-sources
delombok
false
src/main/java
maven-clean-plugin
delombok-removal
compile
clean
true
${project.build.sourceDirectory}/com