Hi,
to be clear, supported versions are
Sonarqube 9.9.4 LTS
Sonarqube 10.4.1 latest
so it makes no sense to update to version 9.8
The machine Sonarqube runs on will need to have an update of its java version, as
Sonarqube 9.9.4 LTS needs to run with Java 17 (so does Sonarqube 10.4.1 latest), see
Usually the Sonarqube server runs on a dedicated machine and the Sonarqube analysis runs local or on CI server like i.e. Jenkins.
The Sonarqube analysis against
Sonarqube 9.9.4 LTS needs to run with Java 11 or Java 17
Sonarqube 10.4.1 latest needs to run with Java 17
If you’re in doubt if projects compiled with/for Java 8 may still be analysed with newer Sonarqube versions, yes that will work fine.
From your given sonar.java.binaries settings
two things spring to mind.
If using the sonar maven plugin, see
there’s no need to set those properties, as those will automatically be set by the sonar maven plugin.
You may split your maven cli calls like that in your Jenkins pipeline, i.e.
this may run with Java 8 for compilation
withMaven(jdk: ..., maven: ..., globalMavenSettingsConfig: ...) {
sh 'mvn clean install'
}
but this has to run with Java 11 or 17 (if using Sonarqube 9.9.4 LTS) or Java 17( if using Sonarqube 10.4.1) and nodejs 20 (requirement for css) is recommended
nodejs(configId: ..., nodeJSInstallationName: 'nodejs-20') {
withSonarQubeEnv(...) {
withMaven(jdk: 'java-17-openjdk', maven: ..., globalMavenSettingsConfig: ...) {
sh 'mvn sonar:sonar'
}
}
}
Gilbert