Java 11 deprecated PR comment while using azure devops defaults

Since a day or two (?) we’re getting comments in our PRs like this from SonarCloud:

SonarCloud analysis warning for project “XXXX”
WarningThe version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

I know we can specify the JDK version in our azure devops but I’d prefer not to pin it to a version. We’re currently default settings. This is what our yml looks like:

- task: SonarCloudAnalyze@1
- task: SonarCloudPublish@1
    pollingTimeoutSec: '300'

Could it be possible that you change the default JDK to 17 instead of me updating it in all my pipelines and pinning it to 17?


This needs a response. Even the link posted on the PRs says that for Azure, if using the defaults, we don’t need to do anything. Please clean this up.

1 Like

I have updated my pipeline to set 17 JDK as the default to test and I am still getting this warning on PRs. I am using the Sonarcloud prepare/analyze/publish pipeline tasks, not the sonarscanner via CLI. My guess is the tasks themselves have Java set to 11 for some reason.

I am running the ubuntu-latest image in my pipelines which defaults to Java 11 as the default, but also has Java 17 preinstalled. I just started seeing this warning a day ago as well.

1 Like

Agreed, can we get confirmation nothing is required. Else we will need to update a ton of pipelines.

1 Like

yeah, I am using sonarscanner via CLI and have updated one of the pipelines to use JDK 17, still got the same deprecating warning.

+1 on my side. Need to know if pipelines require updating or not.

+1 for our side also. Any update on this?

+1. Looking forward to an update on this.

+1. We are facing exactly the same warning in our Azure DevOps pipelines and found no way to tell the SonarCloud task to use Java 17.

Hey everybody.

We will sort out the default bahivor of the task his week.

For now, you can alter your pipeline to configure the JVM used.

- task: SonarCloudAnalyze@1
    jdkversion: 'JAVA_HOME_17_X64'

Thanks @Colin

Hello there,

The extension has been updated (it should display v1.38.0 for the prepare task and v1.41.0 for the analyze task).

We’re now choosing Java 17 if it’s available through the JAVA_HOME_17_X64 env variable.



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.