I have to make small website using spring
. so i chose spring template project
then new spring mvc project
whatever i try there is an error that occurred
Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'mTime'.Errors occurred during the build. Errors running builder 'Maven Project Builder' on project 'mTime'. Could not calculate build plan: Failed to parse plugin descriptor for org.apache.maven.plugins:maven-war-plugin:2.1.1 (C:\Users\User01\.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\User01\.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\User01\.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\User01\.m2\repository\org\apache\maven\plugins\maven-war-plugin\2.1.1\maven-war-plugin-2.1.1.jar): invalid LOC header (bad signature)
i know that maven
is included in spring framework
, and when i check the directory, the jars are there.
How can I solve this error?
The relevant part of the error message is:
invalid LOC header (bad signature)
which suggests some binary file being broken, most likely one of the dependencies. If you have a fast Internet connection, just delete your whole maven repository and let maven redownload all the dependencies:
rm -rf ~/.m2/repository/*
From my experience , invalid LOC header (bad signature)
is most probably due to the downloaded .jar file is corrupt.
If you have a slow internet connection , instead of deleting the whole Maven repository , you can try to delete the folder containing the problematic jar according to the hints of the errors message (i.e C:\Users\User01\.m2\repository\org\apache\maven\plugins\maven-war-plugin\2.1.1\
) . Then use mvn clean install -U
to download the dependencies again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With