今天打包maven项目时遇到一错误

错误细节如下:

only whitespace content allowed before start tag and not -

这里错误是maven目录下的setting.xml格式有错,类似settings标签的前面不应有"-"

遂删掉

删掉后保存,再次打包,遇到以下错

expected START_TAG or END_TAG not TEXT
证明标签头前面的“-”没有删干净,继续根据错误提示有问题的地方删除“-”。
全部删除,打包成功

更多推荐

“only whitespace content allowed before start tag and not -“ 报错解决方案