6

プロジェクトでコマンドを実行しようとするとmvn sonar:sonar、頻繁に以下のエラーが発生します。

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar (default-c
li) on project ProjectName: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-mav
en-plugin:3.2:sonar failed: Unable to load the mojo 'sonar' in the plugin 'org.sonarsource.scanner.m
aven:sonar-maven-plugin:3.2' due to an API incompatibility: org.codehaus.plexus.component.repository
.exception.ComponentLookupException: org/sonarsource/scanner/maven/SonarQubeMojo : Unsupported major
.minor version 52.0
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/U39/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-pl
ugin/3.2/sonar-maven-plugin-3.2.jar
[ERROR] urls[1] = file:/C:/Users/U39/.m2/repository/org/apache/maven/shared/maven-dependency-tre
e/2.2/maven-dependency-tree-2.2.jar
[ERROR] urls[2] = file:/C:/Users/U39/.m2/repository/org/codehaus/plexus/plexus-component-annotat
ions/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[3] = file:/C:/Users/U39/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aeth
er-util-0.9.0.M2.jar
[ERROR] urls[4] = file:/C:/Users/U39/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.
4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[5] = file:/C:/Users/U39/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus
-cipher-1.4.jar
[ERROR] urls[6] = file:/C:/Users/U39/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plex
us-utils-3.0.22.jar
[ERROR] urls[7] = file:/C:/Users/U39/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-ap
i/2.8/sonar-scanner-api-2.8.jar
[ERROR] urls[8] = file:/C:/Users/U39/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2
.6.jar
[ERROR] urls[9] = file:/C:/Users/U39/.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]

非常に多くのリソースやリンクを調べた結果、互換性の問題は異なるバージョンの Java コンパイラを使用した場合にのみ発生することがわかりました。Java 8 で Java コードを実行しましたが、それでも上記のエラーが表示されました。

バージョンの詳細:
Java :1.8
Maven : 3.0.5
SonarQube : 5.4

誰かがこの問題から私を助けてくれますか?

4

1 に答える 1