How to disable JRE Autoprovisioning globaly for Azure DevOps Server .NET Builds

SonarQube Server 10.7
Running .NET Scanner on Azure DevOps Server in an Enterprise Environment.

Since Upgrading to Sonar 10.7 all our Builds with Sonar aren’t working any more because of the JRE auto-provisioning feature. :face_with_symbols_over_mouth: Can’t connect to Sonar Enterprise Server because of SSL Error.

How can this feature be disabled globaly?
Only working way i found to disable it in each Pipeline. So i will have to update hundrets of Pipelines. :open_mouth:

- task: SonarQubePrepare@7
  displayName: 'Prepare analysis on SonarQube'
  inputs:
    SonarQube: 'Sonar Enterprise'
    projectKey: '$(SONAR_ProjectKey)'
    projectName: '$(SONAR_ProjectName)'
    projectVersion: '$(Build.BuildNumber)'
    extraProperties: |
     sonar.scanner.skipJreProvisioning=true
#Buildsteps
#....
  - task: SonarQubeAnalyze@7
    displayName: Run Code Analysis
    inputs:
      jdkversion: 'JAVA_HOME_17_X64'

Setting following ENV Vars didn’t work:
SONAR_SCANNER_SKIP_JRE_PROVISIONING=true
SONAR_SCANNER_JAVA_EXE_PATH=<Java Path>
JAVA_HOME=<Java Path>
JAVA_HOME_17_x64=<Java Path>

The Task always is overwriting the JAVA_HOME Variable:

Overwriting the value of environment variable 'JAVA_HOME'. Old value: <Java Path>, new value: C:\Users\serviceuser\.sonar\cache\4bafe2e94439c8193fc8c68247

I would assume that if I set a JAVA_HOME variable, this would be used by default and not simply overwritten.
If I don’t want that, I don’t set a JAVA_HOME variable.

THX

Hi @ArminPrieschl

I’m sorry this is causing you headaches. We have been made aware of the problems with self-signed certificates and JRE auto-provisioning when using the Scanner for .NET. We are working on eliminating all those problems.

I’m afraid there is no general solution to disable auto-provisioning other than editing the pipelines at this time.

I’m deeply sorry for the disruption this is causing. We’ll announce the new version as soon as it’s available.

Denis

We also tried to update the zip file on the server with our cacerts file.

But the pipeline no longer downloads the zip into the cache folder. Without error message. Message in Log appears. But nothing downloaded.
Is a hashmatch done here?