1. 问题描述
环境中安装了2个不同版本的maven,在新的maven中配置了新的mirror后,读取引用,报错,错误信息提示读取失败,地址指向原settings.xml中的mirror地址
部分错误信息如下:
[ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.fh:search-system:1.0.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.6.12 from/to nexus-aliyun (http://xxx.xxx.xxx/nexus/repository/maven-public/)
: Transfer failed for http:///xxx.xxx.xxx/nexus/repository/maven-public/org/springframework/boot/spring-boot-starter-parent/2.6.12/spring-boot-starter-parent-2.6.12.pom and 'parent.relativePath' points at no local POM @ line 5, co
lumn 10
2. 排查
2.1 mvn help:effective-settings
查看maven当前生效的配置
2.2 mvn -X
查看settings.xml读取顺序(环境中会有多个,依次读取)

3. 解决
修改环境变量Path中的maven环境变量,修改为新的maven地址
本文介绍了在安装了两个不同版本Maven的环境中配置新mirror后出现的问题及解决方法。主要问题是新配置未能生效,导致读取依赖失败,并给出了通过调整环境变量Path中Maven路径来解决问题的具体步骤。
395

被折叠的 条评论
为什么被折叠?



