Hard-coded Azure DevOps build agent demand capability for “java” doesn’t exist on hosted agents or where using OpenJDK, preventing build from starting. Given that Oracle is now charging license fees for their Java, nobody want to install that anymore (Microsoft does not either). OpenJDK is referenced in the JAVA_HOME capability instead. Suggest changing forced demand from “java” to “JAVA_HOME”.
- version 4.* SonarQube scanner “Run Code Analysis” task (and probably others)
- potential workaround currently is to manually add a fake capability to the build agent for “java”
- ref: https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube
- ref: here: https://github.com/SonarSource/sonar-scanner-vsts/blob/3357e8f8ad0cf8ef28af34e90d4a5fc5a4ee9184/extensions/sonarqube/tasks/analyze/new/task.json
- ref: microsoft’s build server image: https://github.com/Microsoft/azure-pipelines-image-generation/blob/master/images/win/scripts/Installers/Install-JavaTools.ps1
- ref: Oracle licensing: https://www.aspera.com/en/blog/oracle-will-charge-for-java-starting-in-2019/
All you need to do is approve this Pull Request: