we are currently using the SonarQube plugin in our pipeline.
This suggestion is concerning the Run Code Analysis job, available in Azure DevOps.
Once the job is added to the build, the demand “java exists” is added to the agent. In the transition from JDK to OpenJDK we found that the installation of OpenJDK doesn’t create the demand java. However, because it’s necessary for the Run Code Analysis job our agent can’t execute the entire build.
Is it possible to change this demand? For example, the JAVA_HOME environment variable is present with the OpenJDK installation. This demand is available for the agent to use.
My request is not entirely what you’re suggesting. What we would like is that the demand doesn’t strictly look at java only, so for instance java or java_home as demand.
@sudo-mdthe community post@Colin referred you to explains why we can’t change the demands in our Marketplace extension. To summarise, changing the demand to only java_home would break some use cases, and we can’t demand java or java_home as that isn’t supported by Microsoft.