spring-boot-maven-plugin未指定版本导致的编译错误

spring-boot-maven-plugin未指定版本导致的编译错误

报错
spring-boot-maven-plugin未指定版本导致的编译错误
springboot应用在使用maven编译时会报如下错误:
原因
原因是maven在编译打包过程中没有指定spring-boot-maven-plugin的版本,默认会从nexus仓库中拉取最新的打包插件版本,而最新的3.0.0版本不被jdk8支持,无法执行编译。
解决方案
需要用户在pom.xml文件中手动指定spring-boot-maven-plugin该插件的打包版本。
如:
加上版本2.2.6.RELEASE

<build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>2.2.6.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>

————————————————
原文链接:blog.csdn.net/A434534658/article/d...

本作品采用《CC 协议》,转载必须注明作者和本文链接
MissYou-Coding
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!
Coding Peasant @ 互联网
文章
193
粉丝
10
喜欢
60
收藏
63
排名:600
访问:1.3 万
私信
所有博文
博客标签
社区赞助商