电脑故障问答网

 找回密码
 立即注册
查看: 84|回复: 1

spring-boot-maven-plugin:3.0.0:repackage 报错分析

[复制链接]

2

主题

4

帖子

9

积分

新手上路

Rank: 1

积分
9
发表于 2022-12-2 18:33:34 | 显示全部楼层 |阅读模式
结论:这个插件不支持JAVA8

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.0.0:repackage (default) on project midas4j-security-application: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:3.0.0:repackage failed: Unable to load the mojo 'repackage' in the plugin 'org.springframework.boot:spring-boot-maven-plugin:3.0.0' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/springframework/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

上一次编译的是
--- spring-boot-maven-plugin:2.7.5:repackage (default)

原因:11.24 更新了3.0.0版本

Maven Repository: org.springframework.boot » spring-boot-maven-plugin (mvnrepository.com)



处理:

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.7.7.RELEASE</version>
                <configuration>
                    <finalName>${project.artifactId}</finalName>
                    <mainClass>com.xxl.job.admin.XxlJobAdminApplication</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
回复

使用道具 举报

0

主题

4

帖子

5

积分

新手上路

Rank: 1

积分
5
发表于 2022-12-2 18:33:58 | 显示全部楼层
真坑啊
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

云顶设计嘉兴有限公司模板设计.

免责声明:本站上数据均为演示站数据,如购买模板可以上DISCUZ应用中心购买,欢迎惠顾.

云顶官方站点:云顶设计 模板原创设计:云顶模板   Powered by Discuz! X3.4© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表