jenkins-sonar-plugin uses sonar-maven-plugin to perform sonar analysis.
Sonar-maven-plugin has been updated to version 2.7 on 2015-10-19, and the new version is not compatible with Java 6.
The Jenkins-sonar-plugin uses the latest sonar-maven plugin by default, but you can override this.
So, to fix the error, open "Manage Jenkins" / "Configure System", find the section "Sonar", click "Advanced" and enter 2.6 in the "Version sonar-maven-plugin". This forces jenkins-sonar-plugin to use the previous version of sonar-maven-plugin, which works with Java 6.
Alternatively, if you want to install 2.6 for just one specific Jenkins job, you can force maven to use version 2.6 using the target org.codehaus.mojo:sonar-maven-plugin:2.6:sonar instead of the standard sonar:sonar .
Also: Start planning to upgrade your build server to Java 7 or Java 8.
Rasmus faber
source share