Sonar-maven-plugin:3.1.1:声纳失败:执行org.sonarsource.scanner.maven时遇到API不兼容

时间:2016-12-07 12:13:29

标签: java maven sonarqube sonar-maven-plugin

我已安装 Java 1.8.0_111 (最新更新),下载 apache-maven-3.3.9 SonarQube-6.1 并放入将 sonar-web-plugin-2.5.0.476.jar 添加到sonarQube扩展插件中。

运行maven-sonar-scanner时出现问题,我收到此错误Log。

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:58 min
[INFO] Finished at: 2016-12-07T18:52:57+07:00
[INFO] Final Memory: 84M/885M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:
3.1.1:sonar (default-cli) on project sample: Execution default-cli of goal org.sonar
source.scanner.maven:sonar-maven-plugin:3.1.1:sonar failed: An API incompatibili
ty was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plu
gin:3.1.1:sonar: java.lang.NoSuchMethodError: org.sonar.api.resources.Project.ge
tConfiguration()Lorg/apache/commons/configuration/Configuration;
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1

[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/david.vincent/.m2/repository/org/sonarsource
/scanner/maven/sonar-maven-plugin/3.1.1/sonar-maven-plugin-3.1.1.jar
[ERROR] urls[1] = file:/C:/Users/david.vincent/.m2/repository/org/apache/mave
n/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
[ERROR] urls[2] = file:/C:/Users/david.vincent/.m2/repository/org/codehaus/pl
exus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[3] = file:/C:/Users/david.vincent/.m2/repository/org/eclipse/aet
her/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
[ERROR] urls[4] = file:/C:/Users/david.vincent/.m2/repository/org/sonatype/pl
exus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[5] = file:/C:/Users/david.vincent/.m2/repository/org/sonatype/pl
exus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[6] = file:/C:/Users/david.vincent/.m2/repository/org/codehaus/pl
exus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
[ERROR] urls[7] = file:/C:/Users/david.vincent/.m2/repository/org/sonarsource
/scanner/api/sonar-scanner-api/2.7/sonar-scanner-api-2.7.jar
[ERROR] urls[8] = file:/C:/Users/david.vincent/.m2/repository/commons-lang/co
mmons-lang/2.6/commons-lang-2.6.jar
[ERROR] urls[9] = file:/C:/Users/david.vincent/.m2/repository/com/google/code
/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContaine
rException

我已经使用命令 mvn clean install 删除并重新下载了我的所有存储库,但它不起作用。这只是一台PC上的错误,另一台PC正常工作。

我的项目正在使用 Spring Boot Parent 1.4.1.RELEASE ,我的完整POM.XML文件可以在此SO link.

看到

根据这个answer,它应该是插件版本问题,但我已经下载了SonarQube 6.1的兼容版本

0 个答案:

没有答案