Как устранить ошибку совместимости версии Java плагина SonarQube Maven?JAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Как устранить ошибку совместимости версии Java плагина SonarQube Maven?

Сообщение Anonymous »

Я столкнулся с проблемой при попытке запустить анализ SonarQube в моем проекте с помощью плагина SonarQube Maven. Сообщение об ошибке указывает на несовместимость API из-за версии среды выполнения Java. Ниже приведено подробное сообщение об ошибке:

Код: Выделить всё

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar (default-cli) on project XplTrack: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar failed: An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin:4.0.0.4121:sonar: java.lang.UnsupportedClassVersionError: org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

[ERROR] -----------------------------------------------------

[ERROR] realm = plugin>org.codehaus.mojo:sonar-maven-plugin:4.0.0.4121

[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

[ERROR] urls[0] = file:/C:/Users/ZAKARIA/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/4.0.0.4121/sonar-maven-plugin-4.0.0.4121.jar

[ERROR] urls[1] = file:/C:/Users/ZAKARIA/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar

[ERROR] urls[2] = file:/C:/Users/ZAKARIA/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.5/plexus-utils-1.5.5.jar

[ERROR] urls[3] = file:/C:/Users/ZAKARIA/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar

[ERROR] urls[4] = file:/C:/Users/ZAKARIA/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.16.3.1081/sonar-scanner-api-2.16.3.1081.jar

[ERROR] urls[5] = file:/C:/Users/ZAKARIA/.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] -> [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]

[ERROR] For more information about the errors and possible solutions, please read the following articles:

[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Дополнительный контекст
Версия SonarQube: 10.6
Версия Maven: 3.8.1
Java Версия: 11.0.25 (LTS)
Конфигурация pom.xml

Код: Выделить всё


org.apache.maven.plugins

maven-compiler-plugin

3.8.1



11

11



-parameters






Выполнение команды

Код: Выделить всё

mvn clean verify sonar:sonar \

-Dsonar.projectKey=test-maven \

-Dsonar.projectName='test-maven' \

-Dsonar.host.url= \

-Dsonar.token=
Как устранить эту ошибку и успешно запустить анализ SonarQube?

Подробнее здесь: https://stackoverflow.com/questions/793 ... lity-error
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «JAVA»