2017-09-20 105 views
2

隨着SonarQube 6.5,JDK 1.8.0_144和sonar.maven.plugin 3.3.0.603,運行mvn sonar:sonar給了我以下錯誤:運行Maven掃描器拋出一個JAXBException

Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project tdd: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar failed: A required class was missing while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar: javax/xml/bind/JAXBException

我失去了什麼?

感謝,

Nilesh製作

回答

0

運行到完全相同的問題,同時與java-9運行聲納分析。

 
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00) 
Maven home: D:\java\maven\3.5.0\bin\.. 
Java version: 9, vendor: Oracle Corporation 
Java home: D:\java\jdk\1.9.0_181 
Default locale: en_US, platform encoding: Cp1252 
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" 
... 
[INFO] --- sonar-maven-plugin:3.3.0.603:sonar (default-cli) @ _test --- 
... 
[INFO] SonarQube version: 6.5.0 
... 
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.3.0.603:sonar (default-cli) on project 
maven:sonar-maven-plugin:3.3.0.603:sonar: javax/xml/bind/JAXBException 

java-8相同的構建仍然正常工作。

 
Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-03T15:39:06-04:00) 
Maven home: D:\java\maven\3.5.0\bin\.. 
Java version: 1.8.0_131, vendor: Oracle Corporation 
Java home: D:\java\jdk\1.8.0_131\jre 
Default locale: en_US, platform encoding: Cp1252 
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" 
... 
[INFO] --- sonar-maven-plugin:3.3.0.603:sonar (default-cli) @ _test --- 
... 
[INFO] SonarQube version: 6.5.0 
... 
[INFO] BUILD SUCCESS 

我看到javax.javaee-api 6.0 7.08.0這樣的問題似乎到項目的依賴將不涉及相同的行爲。

較舊org.sonarsource.scanner.maven.sonar-maven-plugin3.2插件版本產生相同的結果因此問題與較新的3.3.0.603插件版本無關。

只能用maven 3.5.0運行。

只是爲了它的成功測試1.8.0_144除了1.8.0_131

SonarQube的精確版本是6.5.0.27846

只是一個建議:確保你實際上運行java-8

mvn -v

1

我今天遇到這個問題爲好。我最近安裝了JDK 9.0.1,並將我的項目的語言級別切換到源版本和目標版本1.9。執行乾淨安裝會引發此異常。這個問題最近修復併發布了in issue 2506 of their JIRA,所以從sonarqube實例的管理面板更新sonarjava插件爲我解決了這個問題。

相關問題