Reputation: 619
I want to configure SonarQube for my maven project which is on jdk 1.6. Can I use the latest SonarQube 5.6. It say code should be complied with jdk 1.8 only. Is it possible to analyse code with older version of JDK with SonarQube on latest vesrion of JDK?
My project is compiled on jdk1.6. Do I need to use scanner which supports jdk1.6 because if I uses sonar-maven-plugin - 3.1.1 it gives error :
Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.1.1:sonar (default-cli) on project StreamDiffCLI: 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
Upvotes: 2
Views: 2796
Reputation: 619
If you are installing Sonar-Cube with latest version with JDK 1.8 but your project is compatible to JDK 1.6 the use :
if project are supporting JDK 1.6, please use “sonar.java.source=1.6” in your configuration file to avoid rules applicable for JDK>1.6 e.g in build.xml (ANT)
Upvotes: 1
Reputation: 22824
I believe you're misreading the docs. You can compile your project with whatever version of Java you like. 1.4 even. But you must analyze with 8.
Upvotes: 1