Skip to content

Fix #455: Configure annotationProcessorPaths for Lombok in maven-compiler-plugin#456

Merged
vita-kotacka merged 1 commit into
developfrom
issues/455-fix-lombok-java25
May 15, 2026
Merged

Fix #455: Configure annotationProcessorPaths for Lombok in maven-compiler-plugin#456
vita-kotacka merged 1 commit into
developfrom
issues/455-fix-lombok-java25

Conversation

@vita-kotacka
Copy link
Copy Markdown
Member

Summary

Fixes Lombok annotation processing on Java 25 by explicitly registering Lombok via annotationProcessorPaths in maven-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 — the logger field generated by @Slf4j and other members are not visible to javac:

cannot find symbol
  symbol: variable logger

CI (Java 21) is unaffected; the issue only manifests locally when using Java 25.

Solution

Add explicit annotationProcessorPaths configuration to maven-compiler-plugin in the root pom.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

File Change
pom.xml Added annotationProcessorPaths for Lombok in maven-compiler-plugin

…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>
@vita-kotacka vita-kotacka merged commit 7100b4b into develop May 15, 2026
2 checks passed
@vita-kotacka vita-kotacka deleted the issues/455-fix-lombok-java25 branch May 15, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Support Lombok with Java 25

2 participants