<maven.compiler.source>25</maven.compiler.source>
<maven.compiler.target>25</maven.compiler.target>
For Java 25 to recognize Lombok annotations you must add the following plugin in the build section of your project's pom.xml:
<build>
<finalName>${artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
...
</plugins>
</build>
<!-- Enable annotation processing from classpath (Lombok via openxava); required since JDK 25.
-proc:full only since JDK 23, so it lives in this profile to keep JDK 17 builds working. -->
<profiles>
<profile>
<id>jdk23-annotation-processing</id>
<activation>
<jdk>[23,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<proc>full</proc>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
This is required even if the compilation level is not 25. With <proc>full</proc>, annotation processing runs from the classpath, so Lombok comes transitively from the openxava dependency and you do not need to declare a Lombok version in your pom.xml.
Note that <proc>full</proc> is placed in a profile activated for JDK 23 or higher, because the -proc:full flag does not exist in earlier JDKs. If you put it directly in the build section, compiling with JDK 17 or 21 fails with error: invalid flag: -proc:full. With the profile, the same pom.xml works with JDK 17, 21 and 25.
In projects created from v7.6 onwards, a maven-compiler-plugin for Java 25 is included by default in the pom.xml, although commented out. In projects created from version 7.6.4.1 onward, it is already uncommented. If your plugin still uses annotationProcessorPaths with a fixed Lombok version, replace it with the configuration above.