最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

azure - How to Disable FindBugs SensorScanning or Fix Unsupported Class File Major Version Error in SonarQube with Java 21? - St

programmeradmin3浏览0评论

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?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论