这是我在STS中尝试创建第一个spring应用程序时遇到的错误
Error during build of project [SpringDemo]
Errors occurred during the build.
Errors running builder 'Maven Project Builder' on project 'SpringDemo'.
Could not calculate build plan: Failed to parse plugin descriptor for org.apache.maven.plugins:maven-war-plugin:2.1.1 (C:\Users\user\.m2\repository\org\apache\maven\plugins\maven-war-plugin\2.1.1\maven-war-plugin-2.1.1.jar): invalid LOC header (bad signature)
Failed to parse plugin descriptor for org.apache.maven.plugins:maven-war-plugin:2.1.1 (C:\Users\user\.m2\repository\org\apache\maven\plugins\maven-war-plugin\2.1.1\maven-war-plugin-2.1.1.jar): invalid LOC header (bad signature)
Could not calculate build plan: Failed to parse plugin descriptor for org.apache.maven.plugins:maven-war-plugin:2.1.1 (C:\Users\user\.m2\repository\org\apache\maven\plugins\maven-war-plugin\2.1.1\maven-war-plugin-2.1.1.jar): invalid LOC header (bad signature)
Failed to parse plugin descriptor for org.apache.maven.plugins:maven-war-plugin:2.1.1 (C:\Users\user\.m2\repository\org\apache\maven\plugins\maven-war-plugin\2.1.1\maven-war-plugin-2.1.1.jar): invalid LOC header (bad signature)
pom.xml中有错误。
请帮助我在春天新来......
答案 0 :(得分:1)
二进制文件被破坏,很可能是其中一个依赖项。只需删除整个maven存储库,让maven重新下载所有依赖项:
删除C:\ Users \ user.m2 \ repository
https://stackoverflow.com/a/13044692/2334391 http://tech.deepumohan.com/2012/07/maven-invalid-cen-bad-signature-invalid.html
答案 1 :(得分:0)
删除.m2
文件夹,然后触发mvn install
命令。
无效的LOC标题
此问题与m2文件夹中存在的一些坏jar有关,该文件夹在下载过程中已损坏