WARN: The version of Java (11.0.20) you have used to run this analysis is deprecated

Pool: [Azure Pipelines]
Image: windows-latest
INFO: Java 11.0.20 Eclipse Adoptium (64-bit)
WARN: The 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.

According to the documentation,
" All VM images available in Azure Pipelines for Microsoft-hosted agents already contain Java 17. There is no further action required. For self-hosted agents, you must ensure that you are using Java 17. You can either modify your build pipeline to ensure that it runs with Java 17 by default, or override the JAVA_HOME environment variable just before running the analysis."

Why the scan is using the incorrect version?

Hi @Gulzar_Hussain welcome to the community,

Can you make sure that in the pipeline logs of the Prepare Analysis configuration and Run Code Analysis tasks are respectively showing version v1.38.0 v1.41.0 ?

Thank you.
Mickaël

Hi Mickaël,

Thank you
Yes versions are correct for both.

Cheers
Gulzar

Starting: Prepare analysis on SonarCloud

Task : Prepare Analysis Configuration
Description : Prepare SonarCloud analysis configuration
Version : 1.38.0
Author : sonarsource
Help : Version: 1.38.0. More Information

Starting: Run Code Analysis

Task : Run Code Analysis
Description : Run scanner and upload the results to the SonarCloud server.
Version : 1.41.0
Author : sonarsource
Help : Version: 1.41.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.

More Information

Thank you. Is it possible to share the logs, in debug mode, of the run code analysis configuration please ? I’d like to see which variable is being picked up for defining the java version.

You can either share them here with redaction or I can DM you if you prefer, let me know.

Mickaël

Hi Mickaël,

Kindly DM me.

Thank you
Cheers
Gulzar

Thanks for your help, the issue has been resolved by update JAVA_HOME in Run code analysis step.

Cheers
Gulzar

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