Currently the SonarQube server requires Java 11 to run, whereas SonarQube Scanners can still run with Java 8.
Eclipse has announced that their IDE will require Java 11. At one point, Eclipse ECJ will do the same move and our Java analyzer which is based on the ECJ frontend will need to follow it.
Also, more generally, for any of our other components to use "recent" Java features, they will need Java 11.
And, to be able to run analyzers that require Java 11, Scanners need to run with Java 11 too.
This change can have potentially a big impact for our users since it might require migrating build pipelines to Java 11, which we know from experience is not always straightforward.
We don't require Java 11 to run the Scanners with SonarQube 8.x LTS.
Java 11 will be required on Scanners side in the early versions of SonarQube 9.x.
Since SonarQube 7.9 LTS, our users are already informed by a warning during the analysis that Java 11 will be required (the warning was initially mentioning 8.x).
Since SonarQube 8.9 LTS:
- our users are informed directly in SonarQube UI that Java 11 will be required in 9.x.
- our documentation help users move their analysis to Java 11. See https://docs.sonarqube.org/8.9/analysis/analysis-with-java-11/
As a user analyzing a project, the analysis will fail is Java 8 is used. Java 11 is now required.
- Scanners fail fast if Java 8 is used. And in that case a message explains that Java 11 should be used.
- An upgrade notes (https://docs.sonarqube.org/latest/setup/upgrade-notes/) and documentation (https://docs.sonarqube.org/latest/requirements/requirements/) explain that Java 11 is now required on Scanners side.
- Analysis on SonarLint side keeps working.
Since the server and the scanners with run with Java 11, we can finally move our code to Java 11.
However, libraries that are shared with SonarLint will still need to target Java 8:
- sonar-ws (only protobuf stubs)
- sonar-scanner-protocol (only protobuf stubs)