[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.3.1:install (default-install) on project ecommerce-web: Failed to install metadat
Delete all folders under app folder C:\Users\admin.m2\repository\com\app and then clean build project
I also had this experience. The simple solution was deleting the relevant content of the .m2 folder and local repo folder and build again using mvn clean install (Please make sure backup your important data :))
It's because of character encoding issue. It doesn't appear when we open file in UTF-8 encoded format.
To mitigate this issue, open file in notepad++ and select encoding as "Encode in ANSI". You will see many BOM characters. Remove them manually and save it again. It works.
The problem is in file ecommerce-web/maven-metadata-local.xml
, it contains char(0)
(or null
char, or Unicode: 0x0
).
Clean all local repository, or delete folder with com.app:ecommerce-web
artifact
There is nothing in my maven-metadata-local.xml
It's not true. Open your file with Notepad++ and you will see many null
s
Just go under
C:\Users\admin\.m2\repository\com\app\ecommerce-web\
and delete maven-metadata-local.xml
Then do a clean install one more time, this should fix the problem and that's what I did.
Please backup your .m2 file when it working properly. In case you get above mentioned issue. you can replace the .m2 file which you have got backup. The issue can happen when corrupt the m2 file when occur the power cut kind of issue in advance. Then you wont get same issue again and again.