SonarQube 是否支持 Java9? [英] Does SonarQube support Java9?

查看:31
本文介绍了SonarQube 是否支持 Java9?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题实际上是双重的:

The question is actually twofold:

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

Java8 的同样问题

推荐答案

TL;DR: YES!!!它支持分析,显然自 2017 年 7 月 3 日起(但他们拼命试图隐瞒事实......)

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

截至目前(2017 年 10 月 24 日,SonarQube 版本 6.6),SonarQube 可以使用 SonarJava 4.11 或更新版本,但官方不支持在 Java9 JVM 上运行.

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.

SonarJava 页面 声明它支持 Java 版本到 10:

The SonarJava page states it supports Java versions through 10:

支持的版本、框架和特殊分析

Supported versions, frameworks and special analyses

  • Java 语言版本至 10

SonarJava 4.11 发布新闻状态:

SonarSource 团队很高兴地宣布 SonarJava 4.11 版的发布.

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

此版本引入了对 Java 9 项目的支持.但这意味着什么?

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

这意味着能够解析jigsaw项目引入的module-info.java源文件.

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 增强功能
  • 接口私有方法
  • 钻石运算符扩展
  • Java9 类的 JaCoCo 报告

链接

支持的平台

SonarQube Java 分析器能够分析任何类型的 Java 源文件,而不管它们遵循的 Java 版本如何.但 SonarQube 分析和 SonarQube 服务器需要特定版本的 JVM.

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.

支持:

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

这篇关于SonarQube 是否支持 Java9?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆