STS 创建SpringMVC maven install时项目出现error COMPILATION ERROR :

骑猪看日落 2022-09-24 02:30 298阅读 0赞

出现错误:

  1. [INFO] Scanning for projects...
  2. [INFO]
  3. [INFO] ------------------------------------------------------------------------
  4. [INFO] Building HelloSpringProject 1.0.0-BUILD-SNAPSHOT
  5. [INFO] ------------------------------------------------------------------------
  6. [INFO]
  7. [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ app ---
  8. [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
  9. [INFO] Copying 1 resource
  10. [INFO]
  11. [INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ app ---
  12. [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
  13. [INFO] Compiling 1 source file to D:\software\springMVC\sts-bundle\sts-3.8.0.RELEASE\workspace\HelloSpringProject\target\classes
  14. [INFO] -------------------------------------------------------------
  15. [ERROR] COMPILATION ERROR :
  16. [INFO] -------------------------------------------------------------
  17. [ERROR] Failure executing javac, but could not parse the error:
  18. 错误: 读取C:\Users\c\.m2\repository\org\springframework\spring-webmvc\3.1.1.RELEASE\spring-webmvc-3.1.1.RELEASE.jar时出错; invalid LOC header (bad signature)
  19. 错误: 读取C:\Users\c\.m2\repository\org\springframework\spring-web\3.1.1.RELEASE\spring-web-3.1.1.RELEASE.jar时出错; invalid LOC header (bad signature)
  20. 2 个错误
  21. [INFO] 1 error
  22. [INFO] -------------------------------------------------------------
  23. [INFO] ------------------------------------------------------------------------
  24. [INFO] BUILD FAILURE
  25. [INFO] ------------------------------------------------------------------------
  26. [INFO] Total time: 1.558 s
  27. [INFO] Finished at: 2016-07-23T13:45:52+08:00
  28. [INFO] Final Memory: 9M/178M
  29. [INFO] ------------------------------------------------------------------------
  30. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project app: Compilation failure
  31. [ERROR] Failure executing javac, but could not parse the error:
  32. [ERROR] 错误: 读取C:\Users\c\.m2\repository\org\springframework\spring-webmvc\3.1.1.RELEASE\spring-webmvc-3.1.1.RELEASE.jar时出错; invalid LOC header (bad signature)
  33. [ERROR] 错误: 读取C:\Users\c\.m2\repository\org\springframework\spring-web\3.1.1.RELEASE\spring-web-3.1.1.RELEASE.jar时出错; invalid LOC header (bad signature)
  34. [ERROR] 2 个错误
  35. [ERROR] -> [Help 1]
  36. [ERROR]
  37. [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  38. [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  39. [ERROR]
  40. [ERROR] For more information about the errors and possible solutions, please read the following articles:
  41. [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

解决方法:

Center

将上面的中的3.1.1.RELESE 改成3.1.2RELESE 重新 maven install 解决

发表评论

表情:
评论列表 (有 0 条评论,298人围观)

还没有评论,来说两句吧...

相关阅读