sonarqubemaven-plugincode-standardssonar-maven-plugin

SonarQube maven compatibility (Unsupported major.minor version 52.0)


I have a multi-module maven project with the following versions of softwares:

Maven : 3.2.1
JDK : 1.6
sonar-maven-plugin : 3.4.0

SonarQube server : 6.7.0 (Build 33306)

I get the following error on running clean sonar:sonar :

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar (default-cli) on project MyProject: Execution default-cli of goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905:sonar failed: Unable to load the mojo 'sonar' in the plugin 'org.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905' 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.sonarsource.scanner.maven:sonar-maven-plugin:3.4.0.905
    [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

I believe it has got something to do with the compatibilty of all the software togather. Can someone help.


Solution

  • Unsupported major.minor version 52.0
    

    It means that you have to use JDK 8 or newer instead of JDK 6.

    See more about maroj.minor versions here.