maven版本未指定导致编译失败问题
Execution default of goal org.springframework.boot:spring-boot-maven-plugin:3.1.3:repackage faile
d: Unable to load the mojo 'repackage' in the plugin 'org.springframework.boot:spring-boot-maven-plugin:3.1.3' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/springfra
mework/boot/maven/RepackageMojo has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
解决方案
指定version即可
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.3.5.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
- version compiled Runtime recent classversion compiled runtime recent recognizes versions runtime class runtime version class java version unsupportedclassversionerror compiled version incompatible compiled expected compiled文件class idea springframework repackagemojo compiled version version class android-licenses file recent recently