In Azure DevOps we use Private Build Servers. Due to the licensing requirement passed on by Oracle for Java, we removed Java from our Private Build Servers only to find that all our builds broke. We were surprised to discover that the SonarQube task places a “Demand” capability for the inclusion of “Java”.
The part that surprises me about this is that why is Java required on the Build Server when our SonarQube installation is on a totally separate server? Why do I need Java to be installed on my build server when SonarQube is not even on it? That was my first problem.
I thought I would get around this problem by installing OpenJDK only to find my build still failed. It turns out through a Forum topic I found: Azure DevOps hosted build "java" demanded capability not present that I need to create a Demand capability to fake it out. I noticed that Dave Skender has submitted a fix for this issue back in April, but it has not been taken up by the SonarQube team. I was wondering if they plan on doing this? Also, I was wondering if there is a plan to address the fact that SonarQube is not on the Build Server either and not place a “Demand” on the pipeline in Azure DevOps to include Java when it is not needed. If it is needed for the task, then at least support a different type of demand to include OpenJDK or Azul etc.