You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use --release 8 instead of -source/-target on JDK 17+ buildsΒ #750
Currently the Maven compiler plugin is configured with:
<source>1.8</source>
<target>1.8</target>
This produces Java 8 bytecode but does not restrict the API surface β
a JDK 17 compiler can silently use APIs introduced after Java 8, causing
runtime failures on JDK 8 environments.
Fix: add maven.compiler.release=8 to the existing jdk-17plus profile.
The --release flag enforces both the language level and the available API
surface in one setting, closing this gap where it matters most (LTS JDKs 17, 21, 23).
JDK 8 and 11 continue to use source/target β --release requires JDK 9+
as the compiler, and JDK 9/10 are non-LTS, end-of-life, and not in the CI matrix.
Acceptance Criteria
maven.compiler.release=8 is set inside the jdk-17plus profile in pom.xml
<source> / <target> properties remain in place (still used for JDK 8 / 11 builds)
CI matrix passes on all five JDK versions: 8, 11, 17, 21, 23
A brief comment in pom.xml explains why the strategy differs across JDK versions
Activity