Does SonarQube support Java9?

拈花ヽ惹草 提交于 2019-12-10 02:35:06

问题


The question is actually twofold:

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

Same question for Java8


回答1:


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:

  • SonarQube JIRA queue for search string "java 9"
  • SonarQube JIRA queue for search string "java9"
  • SonarQube JIRA ticket "MMF-833: Make SonarJava supporting the analyzis of Java 9 projects"


来源:https://stackoverflow.com/questions/44002165/does-sonarqube-support-java9

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!