Enforcing specific Java versions for compilation

This commit is contained in:
Philip Helger 2025-10-22 15:54:07 +02:00
parent be9dcaac03
commit 1da41a718f
2 changed files with 22 additions and 0 deletions

View file

@ -19,6 +19,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- (CORE) Migration from javax to jakarta xml bind
- (DOC) [GitHub PR#132](https://github.com/itplr-kosit/validator/pull/132) Updated the link to the example Validator scenario configuration
- (BUILD) Support for *building and compilation* is restricted to the following Java versions:
- Java 11: any version ≥ 11.0.23
- Java 12 to 16 will not work
- Java 17: any version ≥ 17.0.11
- Java 18 to 20 will not work
- Any version from Java 21 onwards will work
- The reason for this is the usage of the `-proc:full` compiler parameter which in turn is needed for Lombok usage in JDK 23+.
### Removed

15
pom.xml
View file

@ -241,6 +241,16 @@
<requireMavenVersion>
<version>[3.3.9,)</version>
</requireMavenVersion>
<requireJavaVersion>
<!-- Required for "-proc:full" required for Lombok:
Any Java 11 (LTS) >= 11.0.23
No Java 12 to 16
Any Java 17 (LTS) >= 17.0.11
No Java 18 to 20
Any Java 21 or higher
-->
<version>[11.0.23,12),[17.0.11,18),[21,)</version>
</requireJavaVersion>
</rules>
</configuration>
</execution>
@ -253,6 +263,11 @@
<configuration>
<release>11</release>
<encoding>UTF-8</encoding>
<!-- This is required for Lombok only since JDK 23
Was backported to 17.0.11 and 11.0.23.
See: https://inside.java/2024/06/18/quality-heads-up/
-->
<proc>full</proc>
</configuration>
</plugin>