Skip to content

SonarCloud analysis fails: Java 17 no longer supported - #1141

Merged
alexmontesg merged 1 commit into
mainfrom
fix/GH-1140-sonar-java21
Aug 4, 2026
Merged

SonarCloud analysis fails: Java 17 no longer supported#1141
alexmontesg merged 1 commit into
mainfrom
fix/GH-1140-sonar-java21

Conversation

@alexmontesg

Copy link
Copy Markdown
Contributor

What

Adds an actions/setup-java step (Temurin 21) before the SonarCloud scanner runs in .github/workflows/code-npm_node-sonarcloud-analysis.yml.

Why

Every PR's SonarCloud / Unit Tests check currently fails with:

ERROR: The version of Java (17) used to run this analysis is deprecated, and SonarQube Cloud no longer supports it. Please upgrade to Java 21 or later.

npx sonar-scanner (unpinned) resolves to the legacy, unmaintained sonar-scanner@3.1.0 npm package, which doesn't auto-provision a JRE — it runs analysis with whatever java is first on the runner's PATH, which is Java 17 on ubuntu-24.04. SonarQube Cloud dropped support for Java 17 analysis.

Closes #1140

npx sonar-scanner resolves the legacy, unmaintained sonar-scanner@3.1.0
npm package, which runs analysis with whatever `java` is first on the
runner's PATH (Java 17 on ubuntu-24.04). SonarQube Cloud dropped
support for Java 17 analysis, so every run now fails with:

  ERROR: The version of Java (17) used to run this analysis is
  deprecated, and SonarQube Cloud no longer supports it.

Add actions/setup-java (Temurin 21) before the scanner step so it
picks up a supported JRE from PATH/JAVA_HOME.

Closes #1140

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@alexmontesg
alexmontesg requested a review from jesusmpc August 4, 2026 08:10
@alexmontesg
alexmontesg merged commit 04bd1ab into main Aug 4, 2026
15 checks passed
@alexmontesg
alexmontesg deleted the fix/GH-1140-sonar-java21 branch August 4, 2026 08:50
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.

SonarCloud analysis fails: Java 17 is no longer supported by SonarQube Cloud

2 participants