This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git


The following commit(s) were added to refs/heads/main by this push:
     new e49ae261c8 Fixes #9200. Build Camel with JDK 25 in the camel-main CI 
workflows
e49ae261c8 is described below

commit e49ae261c8e0a76ab53bbdec649df4c1c5b47782
Author: Jiří Ondrušek <[email protected]>
AuthorDate: Tue Sep 22 09:02:45 2026 +0200

    Fixes #9200. Build Camel with JDK 25 in the camel-main CI workflows
    
    Camel compiles its Java 21/25 multi-release sources (e.g. the virtual
    thread aware CamelThreadFactory) only when built on JDK 21+. The
    camel-main CI and nightly workflows built Camel on JDK 17, producing
    jars without those classes, unlike the released Camel jars used on
    main. Set up JDK 25 only for the Camel build step and switch back to
    JDK 17 right after it, in both ci-build.yaml and camel-master-cron.yaml.
    
    Co-authored-by: Claude Fable 5.1 <[email protected]>
---
 .github/workflows/camel-master-cron.yaml | 12 ++++++++++++
 .github/workflows/ci-build.yaml          | 14 ++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/.github/workflows/camel-master-cron.yaml 
b/.github/workflows/camel-master-cron.yaml
index fc977e393c..5e7d00ab44 100644
--- a/.github/workflows/camel-master-cron.yaml
+++ b/.github/workflows/camel-master-cron.yaml
@@ -80,10 +80,22 @@ jobs:
       - name: Setup Maven Cache
         id: maven-cache
         uses: ./.github/actions/setup-maven-cache
+      - name: Set up JDK 25 for the Camel build
+        # Camel compiles its Java 21/25 multi-release sources (e.g. the 
virtual thread aware CamelThreadFactory)
+        # only when built on JDK 21+, so build it like the Camel releases are 
built (JDK 25)
+        uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # 
v6.0.1
+        with:
+          distribution: 'temurin'
+          java-version: '25'
       - name: Build Camel
         run: |
           cd ../camel
           ./mvnw ${CQ_MAVEN_ARGS} clean install -Dquickly -T1C
+      - name: Restore JDK 17 after the Camel build
+        uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # 
v6.0.1
+        with:
+          distribution: 'temurin'
+          java-version: '17'
       - name: Update extension metadata
         run: |
           ./mvnw -N cq:update-quarkus-metadata ${CQ_MAVEN_ARGS}
diff --git a/.github/workflows/ci-build.yaml b/.github/workflows/ci-build.yaml
index 7d4aa98b1b..30b623f4a5 100644
--- a/.github/workflows/ci-build.yaml
+++ b/.github/workflows/ci-build.yaml
@@ -247,11 +247,25 @@ jobs:
       - name: Setup Maven Cache
         id: maven-cache
         uses: ./.github/actions/setup-maven-cache
+      - name: Set up JDK 25 for the Camel build
+        # Camel compiles its Java 21/25 multi-release sources (e.g. the 
virtual thread aware CamelThreadFactory)
+        # only when built on JDK 21+, so build it like the Camel releases are 
built (JDK 25)
+        if: github.ref == 'refs/heads/camel-main' || github.base_ref == 
'camel-main'
+        uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # 
v6.0.1
+        with:
+          distribution: 'temurin'
+          java-version: '25'
       - name: Build Camel
         if: github.ref == 'refs/heads/camel-main' || github.base_ref == 
'camel-main'
         run: |
           cd ../camel
           ./mvnw ${CQ_MAVEN_ARGS} clean install -Dquickly -T1C
+      - name: Restore JDK 17 after the Camel build
+        if: github.ref == 'refs/heads/camel-main' || github.base_ref == 
'camel-main'
+        uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # 
v6.0.1
+        with:
+          distribution: 'temurin'
+          java-version: '17'
       - name: Detect PR Incremental Build
         id: detect-incremental
         if: github.event_name == 'pull_request' && 
!contains(github.event.pull_request.labels.*.name, 'ci/disable-incremental')

Reply via email to