记一次 mvn sonar:sonar做代码审查时的异常处理 ...Runtime only recognizes class file versions up to 52.0

记一次 mvn sonar:sonar做代码审查时的异常处理

  • Caused by: java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/maven/SonarQubeMojo 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
    • 处理方式

Caused by: java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/maven/SonarQubeMojo 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

处理方式

在项目的pom.xml中添加plugin配置

<build>
    <plugins>
       <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>3.11.0.3922</version>
        </plugin>
     </plugins>
</build>

你可能感兴趣的:(java,maven)