expected START_TAG or END_TAG not TEXT (position: TEXT seen ...\n\ua0\ua0\ua0\ua0\ua0\ua

maven項目打包的時候報下面的錯誤:
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] Malformed POM D:\test\test-project\test-a\pom.xml: expected START_TAG or END_TAG not TEXT (position: TEXT seen ...<dependency>\n\ua0\ua0\ua0\ua0\ua0\ua0\ua0\ua0\ua0\ua0\ua0 <g... @26:15)  @ D:\HuaXiaLongProject\test-project\test-a\pom.xml, line 26, column 15
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project test-a:test-a:0.0.1-SNAPSHOT (D:\test\test-project\test-a\pom.xml) has 1 error
[ERROR]     Malformed POM D:\test\test-project\test-a\pom.xml: expected START_TAG or END_TAG not TEXT (position: TEXT seen ...<dependency>\n\ua0\ua0\ua0\ua0\ua0\ua0\ua0\ua0\ua0\ua0\ua0 <g... @26:15)  @ D:\HuaXiaLongProject\test-project\test-a\pom.xml, line 26, column 15 -> [Help 2]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException

問題原因和解決方法:pom.xml文件裏的jar前面的空格有問題,重新刪除空格再換行即可解決
例如:jar是從其他地方複製過來的,畫框的地方空格,可能有問題,但是pom文件是沒有報錯的,刪除空格重新換行

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章