简体   繁体   English

SonarQube支持Java9吗?

[英]Does SonarQube support Java9?

The question is actually twofold: 问题实际上是双重的:

  • Can Java9 projects be analysed with SonarQube? 可以使用SonarQube 分析 Java9项目吗?
  • Can SonarQube itself run on a Java9 JVM? SonarQube本身可以在Java9 JVM上运行吗?

Same question for Java8 Java8的同样问题

TL;DR: YES!!! TL; DR: 是的! It supports analysis, apparently since 3rd July 2017 (But they are desperately trying to hide the fact...) 它支持分析,显然是从2017年7月3日开始 (但他们拼命试图隐瞒事实......)

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 . 截至目前(2017-10-24,SonarQube版本6.6),SonarQube 可以使用SonarJava 4.11或更新版本来分析Java9代码 ,但是在Java9 JVM上运行并不是官方支持的

SonarQube Java Plugin compatibility SonarQube Java插件兼容性

The SonarJava page states it supports Java versions through 10: SonarJava页面声明它支持Java版本到10:

Supported versions, frameworks and special analyses 支持的版本,框架和特殊分析

  • Java language versions through 10 Java语言版本到10

The SonarJava 4.11 release news also states: SonarJava 4.11发布消息还指出:

The SonarSource Team is pleased to announce the release of SonarJava version 4.11. SonarSource团队很高兴地宣布发布SonarJava版本4.11。

This version introduces support for Java 9 projects . 此版本引入了对Java 9项目的支持 But what does that mean? 但是,这是什么意思?

This means being able to parse the module-info.java source files introduced by the jigsaw project. 这意味着能够解析jigsaw项目引入的module-info.java源文件。

Also, same page explicitly lists support for: 此外,同一页明确列出对以下内容的支持

  • Try-With-Resources enhancements Try-With-Resources增强功能
  • Interface private methods 接口私有方法
  • Diamond Operator Extension 钻石运营商扩展
  • JaCoCo reports for Java9 classes JaCoCo报告了Java9类

SonarQube platform compatibility SonarQube平台兼容性

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. SonarQube Java分析器能够分析任何类型的Java源文件,无论它们遵循的Java版本如何。 But SonarQube analysis and the SonarQube Server require specific versions of the JVM. 但SonarQube分析和SonarQube服务器需要特定版本的JVM。

Support: 支持:

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

Links: 链接:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM