SpringBoot 打包出错 Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-res

问题描述

springboot 应用程序打包报错: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-res

原因分析

plugins标签里面缺少maven-resources-plugin依赖。

<plugins>
<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <configuration>
        <excludes>
            <exclude>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
            </exclude>
        </excludes>
    </configuration>
</plugin>
</plugins>

增加配置项

        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>

此刻问题得到解决。

 

posted @ 2021-12-20 23:07  晓枫的春天  阅读(280)  评论(0编辑  收藏  举报