sonarqube分析java 9

docker sonarqube最新版本6.7.1在
java 9上打破了我的maven构建:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project request-work: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar: javax/xml/bind/ValidationEventHandler
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/jenkins/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.4.0.905/sonar-maven-plugin-3.4.0.905.jar
[ERROR] urls[1] = file:/home/jenkins/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[2] = file:/home/jenkins/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[3] = file:/home/jenkins/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
[ERROR] urls[4] = file:/home/jenkins/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.10.0.1189/sonar-scanner-api-2.10.0.1189.jar
[ERROR] urls[5] = file:/home/jenkins/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] : javax.xml.bind.ValidationEventHandler
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 

java 8上的相同配置工作完美.

怎么解决?

最佳答案 在
SonarQube requirements页面上,您可以阅读SonarQube

仅支持Open JDK 8和Oracle JRE 8.因此,您需要运行时来运行SonarQube分析和SonarQube网站.

主要问题是产品中包含的当前ElasticSearch引擎(在ElasticSearch 6.2中添加了对Java 9的支持,

另见JIRA项目
SONAR-10574).

例如,您可以在
this博客中阅读JDK 9的内容

开发人员需要将代码迁移到JDK 10,JDK 11(今年晚些时候)或回退到JDK 8.另请参阅

this所以要求计划的问题

对于SonarQube 7.x版本,仍然没有答案.很有可能会构建对下一个Java运行时的支持

7.x版本,而不是6.x版本.您可以分析Java 9代码.见
this

所以细节问题.

点赞