Maven non-parseable settings exceptions and editing issues with settings.xml files

Source: Internet
Author: User
Tags tag name ultraedit

MAVEN has been running well after downloading to local decompression.

After using UltraEdit To configure the settings.xml file and save it directly, execute the MVN again with the following error:

C:\SAM\WORKS\MYPROJECT>MVN
[ERROR] Error executing Maven.
[ERROR] 1 problem is encountered while building the effective settings
[FATAL] non-parseable settings C:\Users\hanxb\ . m2\settings.xml:expected start
 tag name and not \u0 (position:start_document seen <\u0 ... @1:2)  @ C:\Users\
Hanxb\.m2\settings.xml, line 1, column 2

With the error message, we know that this is an issue with the settings.xml file encoding.

Select "Save As" in UltraEdit, as shown in the following figure.


found that the same problem persists after settings.xml file is saved, even if format:utf-8is selected.


Have to use Beyond Compare, compare modified settings.xml files and backup settings.xml files (the habit of backup is so precious), find the real killer, as shown in the figure below.


The left side is the UltraEdit modified file, and the right side is the original file for the backup. UltraEdit has saved settings.xml files beyond recognition.

The analysis found that UltraEdit is a bit too smart, always smart to guess which encoding method to save, but here it misses.

Try to use nodepad++ to edit the settings.xml file, save after the execution without any coding problems, it seems nodepad++ is still relatively sub-point.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.