We recently upgraded our codebase from Java 17 to Java 21. During our Maven build, we use the following Azure pipeline tasks to run SonarQube:
- task: SonarQubePrepare@7
inputs:
SonarQube: 'SonarQube'
scannerMode: 'Other'
- task: Maven@4
condition: succeeded()
displayName: Build
inputs:
mavenPomFile: pom.xml
mavenOptions: ${{ parameters.mavenOptions }}
javaHomeOption: JDKVersion
jdkVersionOption: ${{ parameters.jdkVersionOption }}
jdkArchitectureOption: x64
options: '-U --no-transfer-progress -Dsonar.java.binaries=$(System.DefaultWorkingDirectory)/**/classes'
goals: clean install
sonarQubeRunAnalysis: true
However, we are now encountering the following error from the FindBugs scanner:
[INFO] Sensor FindBugs Sensor [findbugs]
[INFO] Loading findbugs plugin: .../target/sonar/findbugs/findsecbugs-plugin.jar
[INFO] Findbugs output report: .../target/sonar/findbugs-result.xml
The following errors occurred during analysis:
Error scanning xy for referenced classes
java.lang.IllegalArgumentException: Unsupported class file major version 65
We do not have the possibility to change our SonarQube version, which is currently 9.9.4 (build 87374).
How can we disable the FindBugs sensor/scanning or fix this issue?