`JAVA_HOME_17` var required for ADO task

Good morning.

We are in the process of upgrading SonarQube from 9.9 to 10.4. We’ve supplied our build agents with the newest Java 17, but analysis still failed. Investigation showed that we need to supply JAVA_HOME_17 variable to the analysis task. When supplied, the analysis works again.

Will the SonarQubeAnalyze Azure DevOps task be updated to reflect this new requirement?
Right now the default value of jdkVersion input is still JAVA_HOME_11_X64 (SonarQubeAnalyze@5 - Run Code Analysis v5 task | Microsoft Learn).

If the task won’t be updated to reflect the new requirement, we are forced to edit a large list of pipelines to use the correct Java version.

Thank you

1 Like

Hello @JeffreyH89 ,

We can’t just change the default value to Java 17, because it would break LTS users that don’t have Java 11 installed. We will release a next major version of the tasks that will contain this change. The work for this is not planned yet but it is in our backlog. You can follow our internal ticket or watch the github repo if you want to be notified.

So I would recommend specifying jdkversion in your pipeline as it is a required value. You can also make it point to JAVA_HOME and ensure JAVA_HOME points to Java 17. This will also reduce the number of pipelines you have to edit for future Java upgrades.

Hope this helps

1 Like