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文件是没有报错的,删除空格重新换行
expected START_TAG or END_TAG not TEXT (position: TEXT seen ...<dependency>\n\ua0\ua0\ua0\ua0\ua0\ua
最新推荐文章于 2023-03-29 17:16:35 发布