java - How to make SonarQube use JDK8 in Jenkins job using different JDK -


i had tried configuring sonarqube in jenkins using below approach.

enabling "prepare sonarqube scanner environment" build environment option , defining sonar options in 'maven goals , options': sonar:sonar -dsonar.host.url=$sonar_host_url

but problem jenkins job requires jdk7 , sonarqube version (5.6.6) configured requires jdk8. tried multiple ways define jdk properties in 'maven goals , options'

-dsonar.java.source=1.8, -djava.version=1.8,-dsonar.java.source="path of jdk8"

also tried defining java options in sonarqube configuration in 'manage jenkins'. none of options working , sonarqube step failing below error:

caused by: java.lang.unsupportedclassversionerror: org/sonarsource/scanner/maven/sonarqubemojo : unsupported major.minor version 52.0

note: not want use sonarqube option in 'postbuild actions' deprecated.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -