Does SonarQube support Java9?

ppeterka :

The question is actually twofold:

  • Can Java9 projects be analysed with SonarQube?
  • Can SonarQube itself run on a Java9 JVM?

Same question for Java8

ppeterka :

TL;DR: YES!!! It supports analysis, apparently since 3rd July 2017 (But they are desperately trying to hide the fact...)

As of now (2017-10-24, SonarQube version 6.6), SonarQube can analyse Java9 code using SonarJava 4.11 or newer, but running on a Java9 JVM is not officially supported.

SonarQube Java Plugin compatibility

The SonarJava page states it supports Java versions through 10:

Supported versions, frameworks and special analyses

  • Java language versions through 10

The SonarJava 4.11 release news also states:

The SonarSource Team is pleased to announce the release of SonarJava version 4.11.

This version introduces support for Java 9 projects. But what does that mean?

This means being able to parse the module-info.java source files introduced by the jigsaw project.

Also, same page explicitly lists support for:

  • Try-With-Resources enhancements
  • Interface private methods
  • Diamond Operator Extension
  • JaCoCo reports for Java9 classes

SonarQube platform compatibility

link

Supported Platforms

The SonarQube Java analyzer is able to analyze any kind of Java source files regardless of the version of Java they comply to. But SonarQube analysis and the SonarQube Server require specific versions of the JVM.

Support:

  • Oracle JRE 7 ❌
  • Oracle JRE 8 ✓
  • Oracle JRE 9 ❌
  • OpenJDK 7 ❌
  • OpenJDK 8 ✓
  • OpenJDK 9 ❌
  • IBM JRE ❌
  • GCJ ❌
  • Oracle JRockit ❌

Links:

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=441364&siteId=1