maven settings.xml無效排查過程

1.首先執行mvn help:effective-settings,查找當前maven倉庫地址

2.錯誤信息
[ERROR] Error executing Maven.
[ERROR] 2 problems were encountered while building the effective settings
[FATAL] Non-parseable settings /Users/xxx/work/tools/apache-maven-3.6.3/conf/settings.xml: end tag name </profiles> must be the same as start tag <settings> from line 46 (position: TEXT seen ...</profile>\r\n    -->\r\n  </profiles>... @246:14)  @ /Users/xxxx/work/tools/apache-maven-3.6.3/conf/settings.xml, line 246, column 14
[WARNING] Unrecognised tag: 'distributionManagement' (position: START_TAG seen ...</pluginRepositories>\n            <distributionManagement>... @76:37)  @ /Users/xxx/.m2/settings.xml, line 76, column 37


3.從錯誤信息中可以看到maven的settings.xml的配置地址,發現配置錯了。

4.修改後執行,會按照配置的倉庫執行下載,下載後會顯示settings.xml的配置信息

 

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