Skip to content

Camel 22996 drop java17 - #221

Merged
apupier merged 3 commits into
apache:mainfrom
apupier:CAMEL-22996-dropJava17
Oct 20, 2026
Merged

apupier merged 3 commits into
apache:mainfrom
apupier:CAMEL-22996-dropJava17

Conversation

@apupier

@apupier apupier commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Java 17 support has been dropped in Camel core. This repository already builds on Java 21 (javaVersion in the root pom.xml, the CI workflows, AGENTS.md), so this PR only removes the leftover Java 17 references.

JIRA: https://issues.apache.org/jira/browse/CAMEL-22996

Changes

One commit per change:

  1. Use Java 21 base image for JKube builds
    The root pom.xml set jkube.generator.from to registry.access.redhat.com/ubi9/openjdk-17:latest. It now uses ubi9/openjdk-21:latest, so container images built by the examples no longer run on a JDK older than the baseline. No module overrides this property.

  2. Remove hardcoded Java 17 release from loggingtracer
    observation/loggingtracer was the only module that set maven.compiler.release to 17. The property is removed.

  3. Update README prerequisites to Java 21
    salesforce, genai-observability and aot-basic (GraalVM download instructions) now say Java 21 instead of Java 17.

Notes for reviewers

  • observation/loggingtracer has no <parent>, so it does not inherit javaVersion (21). Without the property, the compiler level falls back to the maven-compiler-plugin default. The module still compiles, but the classes are now Java 8 bytecode (class file major version 52). If you prefer Java 21 bytecode there, the module can either get the examples parent or set the release explicitly. I can add that if you want it in this PR.
  • I left azure/pom.xml unchanged. It sets maven.compiler.source/target to 8, which is not a Java 17 reference, and the build passes.
  • A repo-wide search for Java 17 / JDK 17 / openjdk-17 finds no remaining references.

Testing

On JDK 21.0.9 (Temurin):

  • ./mvnw -V --no-transfer-progress clean install -DskipTests: BUILD SUCCESS, all 102 modules, including loggingtracer.
  • ./mvnw -V --no-transfer-progress test: BUILD SUCCESS, no test failures.

I did not build or run any container image with the new openjdk-21 base image. I only confirmed that the image exists in the Red Hat catalog.


Claude Code on behalf of Aurélien Pupier

Java 17 support has been dropped in Camel core and this repository
already builds with Java 21 (javaVersion in the root pom.xml and the CI
workflows). The root pom.xml still configured JKube to generate container
images from registry.access.redhat.com/ubi9/openjdk-17, so images built
by the examples would run on a JDK older than the supported baseline.

Switch jkube.generator.from to ubi9/openjdk-21 (same Red Hat registry,
same ubi9 flavour). No module overrides this property, so the change
applies to all JKube-enabled examples.

Co-authored-by: IBM Bob 2.2.1
Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Java 17 support has been dropped in Camel core. The loggingtracer module
was the only one explicitly setting maven.compiler.release to 17. Remove
that property rather than bumping it to 21.

Note: this module declares no <parent>, so it does not inherit
javaVersion (21) from the examples root pom. Without the property, the
compiler level falls back to the maven-compiler-plugin default; the
module still compiles (./mvnw -f observation/loggingtracer/pom.xml
clean compile) but the generated classes are now Java 8 bytecode
(class file major version 52). If a higher bytecode level is wanted
later, the module should either get the examples parent or set the
release explicitly.

Co-authored-by: IBM Bob 2.2.1
Signed-off-by: Aurélien Pupier <apupier@ibm.com>
Java 17 support has been dropped in Camel core and the examples build
with Java 21 (javaVersion in the root pom.xml, CI, AGENTS.md). Three
READMEs still advertised Java 17 as the minimum:

- salesforce: "Java 17 or higher" -> "Java 21 or higher"
- genai-observability: "Java 17+" -> "Java 21+"
- aot-basic: GraalVM download instructions now say to choose Java 21
  (or newer)

A search of all *.adoc and *.md files found no other Java version
requirement.

Co-authored-by: IBM Bob 2.2.1
Signed-off-by: Aurélien Pupier <apupier@ibm.com>
@apupier
apupier merged commit c0b9389 into apache:main Oct 20, 2026
1 check passed
@apupier
apupier deleted the CAMEL-22996-dropJava17 branch October 20, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants