当前位置:   article > 正文

Maven打包项目错误:Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources_plugin validation issues were detected in 2 plugin

plugin validation issues were detected in 2 plugin(s) org.apache.maven.plugi

在执行mvn clean package时报错:

  1. [INFO] --- resources:3.2.0:resources (default-resources) @ gw-demo ---
  2. [INFO] Using 'UTF-8' encoding to copy filtered resources.
  3. [INFO] Using 'UTF-8' encoding to copy filtered properties files.
  4. [INFO] Copying 1 resource
  5. [INFO] ------------------------------------------------------------------------
  6. [INFO] BUILD FAILURE
  7. [INFO] ------------------------------------------------------------------------
  8. [INFO] Total time: 3.592 s
  9. [INFO] Finished at: 2024-01-04T21:57:54+08:00
  10. [INFO] ------------------------------------------------------------------------
  11. [WARNING]
  12. [WARNING] Plugin validation issues were detected in 2 plugin(s)
  13. [WARNING]
  14. [WARNING] * org.apache.maven.plugins:maven-resources-plugin:3.2.0
  15. [WARNING] * org.apache.maven.plugins:maven-clean-plugin:3.1.0
  16. [WARNING]
  17. [WARNING] For more or less details, use 'maven.plugin.validation' property with one of the values (case insensitive): [BRIEF, DEFAULT, VERBOSE]
  18. [WARNING]
  19. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project gw-demo: Input length = 1 -> [Help 1]
  20. [ERROR]
  21. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  22. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  23. [ERROR]
  24. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  25. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

1.在pom文件中加入一下这段代码,问题解决

  1. <build>
  2. <plugins>
  3. <plugin>
  4. <groupId>org.apache.maven.plugins</groupId>
  5. <artifactId>maven-resources-plugin</artifactId>
  6. <version>2.7</version>
  7. </plugin>
  8. <plugin>
  9. <groupId>org.springframework.boot</groupId>
  10. <artifactId>spring-boot-maven-plugin</artifactId>
  11. </plugin>
  12. </plugins>
  13. </build>

2.重新执行mvn clean package已经没有报错了

  1. [INFO] --- spring-boot:2.5.0:repackage (repackage) @ gw-demo ---
  2. [INFO] Replacing main artifact with repackaged archive
  3. [INFO] ------------------------------------------------------------------------
  4. [INFO] BUILD SUCCESS
  5. [INFO] ------------------------------------------------------------------------
  6. [INFO] Total time: 9.708 s
  7. [INFO] Finished at: 2024-01-04T22:58:05+08:00
  8. [INFO] ------------------------------------------------------------------------

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/522495
推荐阅读
相关标签
  

闽ICP备14008679号