We have recently migrated our SQ application from 7.1 to 7.9.6 LTS.
In older setup (SQ 7.1), we were using cxx plugin with version 1.0.0 and it was working as expected.
Since cxx 1.0.0 is not compatible with SQ version 7.9.6, we have updated cxx plugin version to 2.0.4.
Since we have updated plugin version, we are getting java compatibility issue as below:
2021-08-30T09:07:15.833754637Z [ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.9.0.2155:sonar (default-cli) on project rc-pipeline: The plugin [cxx] does not support Java 1.8.0_181: org/sonar/plugins/cxx/CxxPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 -> [Help 1]
2021-08-30T09:07:15.833802573Z [ERROR]
Here, please note that source code is at JAVA 8 version and before plugin version update, we were not getting any error.
Even though we have disabled this plugin from UI, it’s still getting referenced during sonar analysis execution. Attaching snap of it for the reference.
Can someone please help me resolve the issue ?
Also, please let me know how we can ensure that specific plugin will not be considered for specific project during sonar analysis execution (If that is possible).
As this is strictly related to SonarOpenCommunity/sonar-cxx (a third-party plugin not developed, maintained or supported by SonarSource or this community), I would recommend raising with the maintainer for support.
The SonarQube Java plugin should run under Java 11 and Java 8. The used Java VM has nothing to do with the supported source code versions. You have to read in the Java plugin manual from SonarQube which source code versions are supported.
As I checked in configured SQ 7.9.6, sonar java plugin exists with version 6.3.2 (build 22818)
Attaching the snap of the same for the reference.