Skip to content

Commit 641df5f

Browse files
JamBalaya56562claude
authored andcommitted
Run SonarCloud analysis on Java 21 (SonarQube Cloud dropped Java 17)
SonarQube Cloud stopped supporting Java 17 as a scanner runtime on 2026-07-20 and now requires Java 21+. The Sonar workflows pin Java 17, so the "Sonar Scanner" job on master started failing, which froze the SonarCloud analysis at its 2026-07-18 snapshot and kept the Quality Gate red for a finding that is already fixed on master. Bump the JVM that runs the analysis (mvn -Pjacoco,sonar) from 17 to 21 in sonar.yml and sonar-pr-analysis-publish.yml. This changes only the JVM used to run the analysis in CI. The plugin's compile target stays Java 8 (maven-compiler-plugin source/target 8) and the user-facing test matrix (Java 8/11) is unchanged. A full build and test run passes on Temurin 21 locally (976 tests, 0 failures). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 3f7a64e commit 641df5f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/sonar-pr-analysis-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
GITHUB_REPO: ${{ github.repository }}
2929
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3030
steps:
31-
- name: Setup Java 17 # Move Sonar analysis to Java 17
31+
- name: Setup Java 21 # SonarQube Cloud requires Java 21+ to run the analysis
3232
uses: actions/setup-java@v5
3333
with:
34-
java-version: '17'
34+
java-version: '21'
3535
distribution: 'temurin'
3636
- name: Dump GitHub context
3737
run: echo '${{ toJSON(github.event) }}'

.github/workflows/sonar.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
with:
3030
# Shallow clones should be disabled for a better relevancy of analysis
3131
fetch-depth: 0
32-
- name: Setup Java 17 # Move Sonar analysis to Java 17
32+
- name: Setup Java 21 # SonarQube Cloud requires Java 21+ to run the analysis
3333
uses: actions/setup-java@v5
3434
with:
35-
java-version: '17'
35+
java-version: '21'
3636
distribution: 'temurin'
3737
- name: Maven Sonar
3838
run: ./mvnw ${MAVEN_ARGS} -Pjacoco,sonar clean install

0 commit comments

Comments
 (0)