maven install error - only whitespace content allowed before start tag and not \u0

后端 未结 6 590
后悔当初
后悔当初 2020-12-15 18:01

[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

相关标签:
6条回答
  • 2020-12-15 18:20

    Delete all folders under app folder C:\Users\admin.m2\repository\com\app and then clean build project

    0 讨论(0)
  • 2020-12-15 18:20

    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 :))

    0 讨论(0)
  • 2020-12-15 18:30

    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.

    0 讨论(0)
  • 2020-12-15 18:33

    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 nulls

    0 讨论(0)
  • 2020-12-15 18:39

    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.

    0 讨论(0)
  • 2020-12-15 18:40

    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.

    0 讨论(0)
提交回复
热议问题