Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0

springboot 打包报错:

Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0

解决办法:

方法一(推荐):

把pom.xml文件中对应的 plugin 修改:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-resources-plugin</artifactId>
      <version>2.7</version>
      <dependencies>
          <dependency>
              <groupId>org.apache.maven.shared</groupId>
              <artifactId>maven-filtering</artifactId>
              <version>1.3</version>
          </dependency>
      </dependencies>
  </plugin>

方法二:

spring boot依赖降级,降到2.1.3,此方法可能会产生其他问题,不推荐

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.3.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

猜你喜欢

转载自blog.csdn.net/weixin_41003771/article/details/114419681