Fix #455: Configure annotationProcessorPaths for Lombok in maven-compiler-plugin#456
Merged
Merged
Conversation
…iler-plugin Starting with JDK 23, the default annotation processing policy changed to 'none', causing Lombok-generated members (e.g. @slf4j logger field) to be invisible to javac on Java 25. Explicitly registering Lombok via annotationProcessorPaths fixes the issue. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
banterCZ
approved these changes
May 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes Lombok annotation processing on Java 25 by explicitly registering Lombok via
annotationProcessorPathsinmaven-compiler-plugin.Closes #455
Problem
Starting with JDK 23, the default annotation processing policy changed to
none. This causes compilation failures of Maven projects using Lombok — theloggerfield generated by@Slf4jand other members are not visible tojavac:CI (Java 21) is unaffected; the issue only manifests locally when using Java 25.
Solution
Add explicit
annotationProcessorPathsconfiguration tomaven-compiler-pluginin the rootpom.xml. This bypasses the implicit APT discovery and works correctly on Java 25.See: wultra/enrollment-server#1781 for the same fix applied to
enrollment-server.Changes
pom.xmlannotationProcessorPathsfor Lombok inmaven-compiler-plugin