- ALM used: Azure DevOps
- CI system used: Azure Devops
- Scanner command used when applicable: C:\WINDOWS\system32\cmd.exe /D /S /C ““C:\Program Files (x86)\apache-maven-3.6.3\bin\mvn.cmd” -f C:\agent\5\12\s\pom.xml package org.sonarsource.scanner.maven:sonar-maven-plugin:RELEASE:sonar”
- Languages of the repository: Java
We are using Azure DevOps with On-Premise agents which runs behind a company proxy.
For almost all tasks and plugins, the proxy is bein used, but when we run SonarCloud analysis as a maven plugin, it is not using the proxy. The only way to make the maven plugin use the proxy, is adding the proxy settings as maven options to the maven task: Maven build and release task - Azure Pipelines | Microsoft Docs.
The disadvantage is that the settings need to be entered for every build that runs SonarCloud from Maven.
I tried the following options, but none of them seem to work:
- As part of JAVA_OPTS environment variable
- As part of MAVEN_OPTS environment variable
- As part of SONAR_SCANNER_OPTS environment variable
- As part of the maven settings.xml (in mavens conf folder)
- As part of the users maven settings (in users .m2 folder)
Am I missing something, or is this a bug in the maven plugin?