Lombok Plugin Version is added, even when managed by Spring Boot
What version of OpenRewrite are you using?
I am using rewrite 6.36.0 ran via Maven CLI.
How are you running OpenRewrite?
mvn -U org.openrewrite.maven:rewrite-maven-plugin:run -Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:RELEASE -Drewrite.activeRecipes=org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_5
There is no specific openrewrite configuration in the pom.xml file.
What is the smallest, simplest way to reproduce the problem?
See the attached Zip, or https://github.com/scottbusche-usps/open-rewrite-7384, but essentially it's a Spring Boot maven project that doesn't have the maven-compiler-plugin block defined, and OpenRewrite will add it along with a Lombok version, instead of letting Boot manage the version.
openrewrite-lombok-reproduction.zip
Note: I have not encountered this with every upgrade we've ran, but I found this way to reproduce it and am opening an issue. If I come across others, I will open a new ticket or add the details here.
What did you expect to see?
This maven-compiler-plugin configured correctly, but without the version, since Spring Boot will manage it. https://docs.spring.io/spring-boot/3.5/appendix/dependency-versions/coordinates.html Boot 3.5 is on 1.18.44 as of the latest 3.5.X.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
What did you see instead?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.40</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
Thanks for the report! And thanks for the help. We'd need to look at the reproducer you shared. Any chance you could push that up as a GitHub repo, even if just temporarily? That makes it easier to browse and work on.
@timtebeek https://github.com/scottbusche-usps/open-rewrite-7384
Thanks! Exploring a fix in
- https://github.com/openrewrite/rewrite/pull/7392