We recently upgraded SonarQube to v9.4. We use Jenkins (currently v2.303.3). We ran into compatibility issues with Java 8 and Java 11 which we addressed in a separate topic. (Issues with Maven and SonarQube).
Since getting scanning fixed, we still have issues when using Quality Gates. Apparently, jobs will either fail or results in SonarQube will so 0 Code Coverage. We also noticed Jobs run from Feature branch may run successfully, but when we move to the main branch it fails. This is just with Java jobs. We think this has to do with the fact that the code and Jenkins are using Java 8, but SonarQube scanner and SonarQube itself is Java 11. Are there any ideas why Quality Gates are not working in this configuration? We will be moving development to Java 11, but that effort will take a while and we need to solve the current issue as soon as possible.