tags:

views:

423

answers:

2

Hi

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 ?

+3  A: 

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.

Rich Seller
+1  A: 

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.

sal
Hi i m working on Mac PC.Does it have anything to do with this issue?
Did you use TextEdit.App? You can go to the preferences in TextEdit.app and see what text encoding it is using. I've seen this issue with developers that use multiple languages (ie, code in english and email/personal in a native language)
sal