When building a Spring Boot project with Java 23 SDK using mvn clean install, Lombok does not generate getters, setters, or constructors. However, when switching to Java 21 SDK, the build succeeds without issues.
Environment
Spring Boot Version: 3.4.3
Lombok Version: 1.18.x
Maven Compiler Plugin: Not explicitly configured (default Spring Boot parent settings)
JDKs Tested:
✅ Java 21 → Lombok works without additional configuration
❌ Java 23 → Lombok does not process annotations unless explicitly configured
Temporary Fix
Adding the following maven-compiler-plugin configuration makes Lombok work with Java 23:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
Root Cause
The issue appears to be related to Java 23 SDK and annotation processing in Maven.
Java 21 works because Spring Boot’s default configuration includes annotation processors automatically.
Java 23 (which is not an LTS version) might not be fully recognized by the default Maven and Spring Boot setup, requiring explicit annotation processor configuration.
Questions
Is this a known issue with Java 23 SDK?
Does Maven or Spring Boot need updates to support Java 23 annotation processing by default?
Should Lombok update its processing behavior for Java 23?
When building a Spring Boot project with Java 23 SDK using mvn clean install, Lombok does not generate getters, setters, or constructors. However, when switching to Java 21 SDK, the build succeeds without issues.
Environment
Spring Boot Version: 3.4.3
Lombok Version: 1.18.x
Maven Compiler Plugin: Not explicitly configured (default Spring Boot parent settings)
JDKs Tested:
✅ Java 21 → Lombok works without additional configuration
❌ Java 23 → Lombok does not process annotations unless explicitly configured
Temporary Fix
Adding the following maven-compiler-plugin configuration makes Lombok work with Java 23:
Root Cause
The issue appears to be related to Java 23 SDK and annotation processing in Maven.
Java 21 works because Spring Boot’s default configuration includes annotation processors automatically.
Java 23 (which is not an LTS version) might not be fully recognized by the default Maven and Spring Boot setup, requiring explicit annotation processor configuration.
Questions
Is this a known issue with Java 23 SDK?
Does Maven or Spring Boot need updates to support Java 23 annotation processing by default?
Should Lombok update its processing behavior for Java 23?