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 must be the same as start tag from line 46 (position: TEXT seen ...\r\n    -->\r\n  ... @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 ...\n            ... @76:37)  @ /Users/xxx/.m2/settings.xml, line 76, column 37


3.从错误信息中可以看到maven的settings.xml的配置地址,发现配置错了。

4.修改后执行,会按照配置的仓库执行下载,下载后会显示settings.xml的配置信息

 

你可能感兴趣的:(java)