Turns out that the requests to sonarcloud.io from within that maven task are not coming through the proxy.
I don’t understand why, as other actions from within the same build and job in the Azure DevOps maven task (getting the packages and plugins) are going through the proxy.
I tried passing the proxy settings in different ways, but only one seems to be working:
- 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)
- As part of the command line options (passing -Dhttps.proxyHost and -Dhttps.proxyPort)
Only the last one seems to work.