Enforce JDK 21+ as minimum build JDK for multi-release JAR support#22609
Merged
Croway merged 1 commit intoapache:camel-4.18.xfrom Apr 16, 2026
Merged
Enforce JDK 21+ as minimum build JDK for multi-release JAR support#22609Croway merged 1 commit intoapache:camel-4.18.xfrom
Croway merged 1 commit intoapache:camel-4.18.xfrom
Conversation
d7f8b58 to
f52de47
Compare
f52de47 to
0817fa9
Compare
apupier
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
requireJavaVersion [21,)to the existingenforce-java-versionexecution inmaven-enforcer-pluginJenkinsfile.deploydefault JDK fromjdk_17_latesttojdk_21_latestminimalJavaBuildVersionfrom${jdk.version}(17) to21Motivation
camel-utiluses multi-release JARs with ajava-21-sourcesprofile activated by<jdk>[21,)</jdk>. If Camel is built with JDK 17, the virtual thread classes underMETA-INF/versions/21/are silently omitted — users running on JDK 21 would get JARs without virtual thread support.Jenkinsfile.deploydefaults tojdk_17_latest, meaning daily SNAPSHOT deployments were built without virtual thread support.This does not change the runtime requirement — Camel JARs remain Java 17 compatible. It only ensures the build JDK is high enough to compile the multi-release JAR layers.
The enforcer runs only when the
fullprofile is active (not with-Dquickly), so fast local builds are unaffected. TheJenkinsfile.deployfix ensures SNAPSHOT deployments use JDK 21.Backport of #22608
Discussion thread: dev@camel.apache.org "[DISCUSS] Enforce JDK 21+ for building Camel"