问题
I wanted to run maven commands from the command line.
While running mvn commands , getting the error-
Error reading settings.xml: only whitespace content allowed before start tag and not \ufffd (position: START_DOCUMENT seen \ufffd... @1:1)
Line: 1
Column: 1
what is the problem with my settings.xml
?
回答1:
This can happen if you've opened and saved your settings.xml from a non-text editor, which can add some non-printing characters to the file.
Try copying all the content and pasting into a new file using a text editor then renaming the file to settings.xml.
回答2:
Do you use multiple character sets in your text editor? You might have saved the text in UTF8 or a UTF16 format. Open in a text editor that supports changing the character encoding and save it as plain ASCII, or ANSI or whatever the normal 7bit scheme is called in that editor.
来源:https://stackoverflow.com/questions/1524775/error-reading-settings-xml