Repository navigation
CAMEL-22996: drop Java 17 support, require Java 21 as minimum - #27943
Conversation
|
|
||
| - **Trigger**: `pull_request` (main branch), `workflow_dispatch` | ||
| - **Matrix**: JDK 17, 21, 25 (25 is experimental) | ||
| - **Matrix**: JDK 21, 25 (25 is experimental) |
There was a problem hiding this comment.
JDK 25 no more experimental but to deal in another PR
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
| - Camel 4.0.0+ requires JDK 17 and supports JDK 21 | ||
| - Camel 4.24.0+ requires JDK 21 |
There was a problem hiding this comment.
will need to make JDK 25 appear here but to do in another PR
| OFFICIAL_IMAGE_ARCH := amd64 | ||
|
|
||
| JDK_VERSIONS = 17-jdk 21-jdk | ||
| JDK_VERSIONS = 21-jdk |
There was a problem hiding this comment.
jdk 25 to add in another PR
e3b0585 to
aacca89
Compare
|
current PR check failures sounds unrelated: |
✅ Generated files are up to dateAn earlier CI run reported uncommitted generated changes; the latest run no longer does. |
|
🧪 CI tested the following changed modules:
🔁 6 tests passed only after a retry on JDK 25 (6 retried attempts) Recovered flaky tests on JDK 25 (6)
🔬 Scalpel shadow comparison — Scalpel: 679 of 706 tested, 0 compile-only — current: 583 all testedMaveniverse Scalpel detected 679 affected modules (current approach: 583). Changed properties: minimalJavaBuildVersion, maven.compiler.source, jdk.version, maven.compiler.release, sonar.java.source, maven.compiler.target Skip-tests mode would test 679 modules (25 direct + 124 downstream), skip tests for 0 (generated code, meta-modules)
|
| Module | Duration | Status |
|---|---|---|
| Camel :: Launcher | 56.8s | SUCCESS |
| Camel :: JBang :: MCP | 44.6s | SUCCESS |
| Camel :: Main | 34.4s | SUCCESS |
| Camel :: Catalog :: Camel Catalog | 24.7s | SUCCESS |
| Camel :: Bindy | 21.5s | SUCCESS |
| Camel :: SMPP | 19.7s | SUCCESS |
| Camel :: Docs | 18.1s | SUCCESS |
| Camel :: AS2 :: API | 15.3s | SUCCESS |
| Camel :: Crypto | 14.0s | SUCCESS |
| Camel :: Util | 13.3s | SUCCESS |
| Camel :: LDAP | 11.9s | SUCCESS |
| Camel :: Google :: BigQuery | 11.5s | SUCCESS |
| Camel :: CXF :: REST | 10.8s | SUCCESS |
| Camel :: Core Model | 9.3s | SUCCESS |
| Camel :: Core XML | 7.2s | SUCCESS |
| Camel :: Base Engine | 6.0s | SUCCESS |
| Camel :: API | 2.2s | SUCCESS |
| Camel :: JBang :: Parent | 2.2s | SUCCESS |
| Camel :: Core | n/a | |
| Camel :: Google :: PubSub | n/a | |
| Camel :: JBang :: Core | n/a | |
| Camel :: Management | n/a | |
| Camel :: Spring XML | n/a |
Top 20 slowest modules:
Camel :: Launcher(56.8s)Camel :: JBang :: MCP(44.6s)Camel :: Main(34.4s)Camel :: Catalog :: Camel Catalog(24.7s)Camel :: Bindy(21.5s)Camel :: SMPP(19.7s)Camel :: Docs(18.1s)Camel :: AS2 :: API(15.3s)Camel :: Crypto(14.0s)Camel :: Util(13.3s)Camel :: LDAP(11.9s)Camel :: Google :: BigQuery(11.5s)Camel :: CXF :: REST(10.8s)Camel :: Core Model(9.3s)Camel :: Core XML(7.2s)Camel :: Base Engine(6.0s)Camel :: API(2.2s)Camel :: JBang :: Parent(2.2s)
|
this other erro is triggered by this PR but a bug in the script launching the PR, not a bug introduced by this PR: EDIT: PR to fix this issue #27947 |
52c2ea2 to
f43b124
Compare
|
there was a full green PR Check but conflicts to resolve, so pushed a new version |
davsclaus
left a comment
There was a problem hiding this comment.
Thanks a lot @apupier for taking this on: it is a wide change (build, CI, archetypes, launcher, docs, the java21 sources in camel-util), and it reads cleanly commit by commit. Promoting CamelThreadFactory is a straight move (the file is identical to main's java21 version), the Thread.threadId() / Locale.of() clean-ups and the reflection removal in the JSSE tests are right for a Java 21 baseline, and the JSSE doc links only change javase/17 to javase/21 (38 links). The --java-version default of camel run/export was already 21.
Two things need fixing before merge (inline):
- A leftover merge conflict marker in the 4.24 upgrade guide (line 1637). It would render on the website.
- Jenkinsfile: ppc64le and s390x lose every build. On main those platforms exclude JDK 17 and JDK 25, so they run JDK 21. Replacing the JDK 17 excludes with JDK 21 excludes leaves them with no JDK at all, next to the existing JDK 25 excludes. The two JDK 17 exclude blocks should be removed, not renamed.
Smaller points, not blocking:
.github/workflows/pr-build-main.yml:216still says "while JDK 17 fails" in the comment about the artifact upload; "JDK 21" now. The flake-label examples in.github/actions/incremental-build/also still say "JDK 17".- The three threads about JDK 25 (CI-ARCHITECTURE, what-are-the-dependencies, the container Makefile) are notes for a follow-up; a JIRA for "JDK 25 is no longer experimental" would let them be resolved here.
- #27433 also changes
SSLContextParametersTest; whichever merges second will need a rebase.
CI: Build and test is green on the head. The only failure, Camel launcher native exe build, is not caused by this PR: that workflow installs camel-jbang-core from source against the SNAPSHOT of camel-yaml-dsl-validator from the snapshot repository, which does not have ProjectFacts yet (added on main on 10-18 by #28058).
Follow-ups this unblocks once merged (not for this PR): the GraalVM bump held at 25.2.4 (CAMEL-25146) and the JToon 2.0.7 upgrade (#27907, CAMEL-25689).
Claude Code on behalf of Claus Ibsen. This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
e39780d to
288f75d
Compare
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
…medGroupsListTest Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
virtual thread tests Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Locale.forLanguageTag() or Locale.of() Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
…release java-21-sources profile Java 21 is now the minimum. The java21/ override that added virtual-thread support via Thread.ofVirtual()/Thread.ofPlatform() can be promoted to src/main/java/ and the java-21-sources multi-release profile removed. The Multi-Release manifest entry is moved to the main build so the remaining java-25-sources profile still works. Co-authored-by: IBM Bob 2.2.1 <noreply@ibm.com> Signed-off-by: Aurélien Pupier <apupier@ibm.com>
288f75d to
5387961
Compare
gnodet-bot
left a comment
There was a problem hiding this comment.
Following up on davsclaus' earlier review — both blocking issues have been addressed.
Jenkinsfile (ppc64le/s390x platforms) — ✅ Fixed. The JDK 17 exclude blocks were removed entirely; only the existing jdk_25_latest excludes remain. Both platforms will now run on jdk_21_latest as intended.
Upgrade guide conflict marker — ✅ Fixed. camel-4x-upgrade-guide-4_24.adoc is clean; the Java 21 breaking-change entry renders correctly.
The remaining nit (stale while JDK 17 fails comment in pr-build-main.yml) is also resolved — it now reads while JDK 21 fails.
The rest of the change is solid:
CamelThreadFactorypromotion fromjava21/tojava/is correct;Multi-Release: trueis present in the main build so thejava-25-sourcesprofile still works.Thread.getId()→Thread.threadId()andLocale.of()/Locale.forLanguageTag()migrations are correct and consistent across all touched files.- SSL test reflection helpers are cleanly replaced with direct JDK 21 API calls; the
@EnabledForJreRange(min=JAVA_21)annotations are correctly dropped. - Launcher test fixtures correctly retain
JAVA17version strings for rejection tests (verifying the new minimum) while acceptance tests now useJAVA21.
LGTM. No issues found beyond what was already addressed.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
davsclaus
left a comment
There was a problem hiding this comment.
Thanks for the quick update, Aurélien. Both blocking points from the previous review are fixed on 5387961fe60e:
- The leftover conflict marker in
camel-4x-upgrade-guide-4_24.adocis gone. - The
Jenkinsfilenow deletes the two JDK 17 exclude blocks, so ppc64le and s390x keep building on JDK 21 (only their JDK 25 entries are excluded, as on main).
git range-diff against the previously reviewed head shows these were the only changes, plus the pr-build-main.yml comment, which now reads correctly for the ['21', '25'] matrix.
Non-blocking, for a follow-up:
- The flake-label examples in
.github/actions/incremental-build/(action.yaml,collect-flakes.py,test_collect_flakes.py) still use "JDK 17" as the example label. They are only illustrative. - Your three notes about making JDK 25 a regular entry (
CI-ARCHITECTURE.md,what-are-the-dependencies.adoc, the camel-jbang-containerMakefile) are still open. A JIRA for that follow-up would let them be resolved here.
CI for this head is still running; please check it goes green before merging.
Claude Code on behalf of Claus Ibsen. This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.
Camel core now requires Java 21 as its minimum (apache/camel#27943). Camel Spring Boot must follow suit. - Change the jdk.version property from 17 to 21. This property drives maven.compiler.source, maven.compiler.target, maven.compiler.release and minimalJavaBuildVersion for every module in the reactor. - Update the two hardcoded <source>17</source> entries in the maven-javadoc-plugin configuration (main build and deploy profile) to <source>21</source> so that Javadoc generation also targets Java 21. Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
The archetype template for new Camel Spring Boot projects carried its own hardcoded <release>17</release> in the maven-compiler-plugin configuration. Projects generated from this archetype must now target Java 21, matching the minimum requirement introduced in Camel core (apache/camel#27943). Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Camel core now requires Java 21 as the minimum (apache/camel#27943). Update all CI workflow files that referenced Java 17: - pr-build-main.yml: replace '17' with '21' in the build matrix so PR builds are validated on Java 21 and Java 25 (EA) instead of 17 and 25. - generate-sbom-main.yml: bump the java-version pin from 17 to 21. - automatic-sync-main.yml: bump the java-version pin from 17 to 21. Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
…test Camel core now requires Java 21 as the minimum (apache/camel#27943). Update the default JDK tool name in all three Jenkinsfiles so that Jenkins pipeline builds (main, deploy and ppc64le) pick up Java 21 when no JDK_NAME environment variable is explicitly overridden. Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Reflect the Java 21 minimum set by Camel core (apache/camel#27943). Co-authored-by: IBM Bob 2.2.1 Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Description
CAMEL-22996: drop Java 17 support, require Java 21 as minimum
What
Raises the minimum required Java version from 17 to 21. The build already
enforced JDK 21+ at build time via the Maven Enforcer plugin; this change
makes the compile target and all runtime assumptions consistent with that.
Why
Java 17 reached end of active support. Java 21 is the current LTS and has
been required to build Camel for some time. Aligning the compile target
eliminates the dual-mode workarounds (multi-release JAR, reflection guards,
@EnabledForJreRange(min = JAVA_21)test annotations) that existed solelyto support the Java 17 baseline.
Changes
Build & CI
pom.xml:jdk.version17 → 21; simplified Maven Enforcer error message.github/workflows/pr-build-main.yml: CI matrix['17', '25']→['21', '25'].github/CI-ARCHITECTURE.md: updated matrix descriptionJenkinsfile: removed JDK 17 axis, parameters, build branch, and relatedppc64le/s390x exclude blocks; added
jdk_21_latestexclude blocks foralt-arch (same pattern as the removed ones)
AGENTS.md: updated Java minimum to 21+Archetypes
All six archetype template
pom.xmlfiles updated:<release>17</release>→<release>21</release>camel-util – multi-release JAR removal
src/main/java21/CamelThreadFactory.java(which usesThread.ofVirtual()/Thread.ofPlatform()and aThreadFactoryTypeenum) to
src/main/java/.src/main/java21/.java-21-sourcesMaven profile and its duplicatemaven-jar-plugin/maven-compiler-pluginconfiguration.Multi-Release: truemanifest entry to the main build so theremaining
java-25-sourcesprofile (forContextValueFactory) still works.Java 21 API clean-up (were TODO / guarded behind version checks)
Thread.getId()→Thread.threadId()in 9 files across core andcomponents (bindy, smpp, as2, google-bigquery, google-pubsub)
new Locale(String, String)→Locale.of()/Locale.forLanguageTag()in IntrospectionSupportTest and DefaultCxfRsBinding
Test clean-up
SSLContextParametersNamedGroupsListTest: removed reflection helper thataccessed
SSLParameters.getNamedGroups()/getSignatureSchemes()viareflection (required on Java 17, direct API on Java 21); switched to AssertJ
SSLContextParametersTest: removed the same reflection helpers; inlined allcall sites directly against the live API
SSLContextParametersTest,ManagedVirtualThreadExecutorTest: removed@EnabledForJreRange(min = JAVA_21)— tests now run unconditionallycamel-jbang
Doctor.checkJava(): updated thresholds — warns at < 21, errors at < 21camel-jbang-container/Makefile: removed17-jdkbuild targetcamel-launcherscripts (camel.sh,camel.bat,install.sh,install.ps1,release-notes.md): updated minimum version referencesfrom 17 to 21
MigrationTools.java: updated@ToolArgexample version strings; thecatalog-driven
javaRequirement()/CamelReleasesabstraction alreadyreturns the correct Java minimum for any Camel release including 4.24+
Documentation
what-are-the-dependencies.adoc,camel-jbang-getting-started.adoc,camel-jbang-launcher-install.adoc,virtual-threads.adoc: updatedversion references
crypto-dataformat.adoc,ldap-component.adoc+ their catalog mirrors:updated
javase/17Oracle Javadoc URLs →javase/21main.adoc+ catalog mirror + generated JSON metadata: updated 12 JSSEparameter Javadoc links from
javase/17→javase/21camel-4x-upgrade-guide-4_24.adoc: added Java 21 as the first(breaking) entry in the 4.24 upgrade guide
Not changed (intentional)
tooling/maven/camel-package-maven-plugin/src/it/HeaderSupport/pom.xmlkeeps
<maven.compiler.release>17</maven.compiler.release>— thisintegration-test fixture pins
camel-bom:4.0.0-M3(a pre-Java-21release) to avoid a circular build dependency; changing it is not safe.
MigrationToolsTest.javafixture POMs that reference Java 17 areintentional: they simulate a user's old source project being analyzed
for migration, not Camel's own build requirements.
Related
https://issues.apache.org/jira/browse/CAMEL-22996
Target
mainbranch)Tracking
Apache Camel coding standards and style
mvn clean install -DskipTestslocally from root folder and I have committed all auto-generated changes.AI-assisted contributions
Co-authored-bytrailers) and the PR description identifies the AI tool used.