fix: make lombok work OOTB with JDK 25 #47334
Closed
+1
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi,
I am in the process of migrating to JDK 25. But with JDK25, a simple Spring Boot project with maven that uses lombok does not work OOTB.
With JDK 21, this dependency is all we need in a Spring Boot project
From JDK 23+, you need to do either enforce maven compiler like following
Or simply add the following in your
<properties>
<maven.compiler.proc>full</maven.compiler.proc>
This PR targets this second option. Hope this is enough, because I am not very used to the pom.xml generation from gradle particularly. Please let me know if this must be put somewhere else in the code base, happy to help.
For reference, here is a lombok issue : projectlombok/lombok#3846
It seems that this parameter has been backport to JDK 11 and more : https://inside.java/2024/06/18/quality-heads-up/ , so this looks safe to me.
Thanks.