sonar-maven-plugin:3.1.1 API incompatibility

2,052 views
Skip to first unread message

Oksana Tkanko

unread,
Sep 7, 2016, 7:14:00 AM9/7/16
to SonarQube
Hi,

I get this error, when I execute sonar goal on my maven project:

mvn sonar:sonar

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1:sonar (default-cli) on project : Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1:sonar failed: Unable to load the mojo 'sonar' in the plugin 'org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/sonarsource/scanner/maven/SonarQubeMojo : Unsupported major.minor version 52.0

My env details:
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_101, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre

Does anyone know how to solve this issue?

Scott B.

unread,
Sep 7, 2016, 8:45:09 AM9/7/16
to SonarQube
Hi.

IIRC, since sonar-maven-plugin 3.1 you must run Maven with Java 8. Note that your project can still target Java 7, you only need Java 8 to execute the Maven build.

Oksana Tkanko

unread,
Sep 7, 2016, 9:53:27 AM9/7/16
to SonarQube
Thank you, will give it a go.

juwangq...@gmail.com

unread,
Jan 24, 2018, 3:28:53 PM1/24/18
to SonarQube
Hi, 

I got this same error when I tried `mvn sonar:sonar`

Could you please let me know how did you finally solve this problem?

Sone information about the env:
Apache Maven 3.2.3
Java version: jdk1.8.0_161
Java home: /usr/lib/jvm/jdk1.8.0_161/jre

Thank you

在 2016年9月7日星期三 UTC-7上午6:53:27,Oksana Tkanko写道:
Reply all
Reply to author
Forward
0 new messages