1. 程式人生 > 其它 >Spring Boot 打包報錯Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0

Spring Boot 打包報錯Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0

問題描述

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project helloworld: Input length = 1 -> [Help 1]

問題分析

1、plugins標籤裡面缺少maven-resources-plugin依賴。

<build>
    <plugins>
        <plugin>
            <groupId
>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build>

解決辦法:新增maven-resources-plugin依賴。

<build>
    <plugins>
        <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> </build>

轉載:https://blog.csdn.net/qq_38974638/article/details/112784951