Maven configuration settings.xml still reads the original settings.xml configuration problem after replacement, locating and solving the problem

1. Problem description

Two different versions of maven are installed in the environment. After configuring a new mirror in the new maven , the reference is read and an error is reported. The error message indicates that the read failed and the address points to the mirror address in the original settings.xml.

Some error messages are as follows:

 [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. Troubleshooting

2.1  mvn help:effective-settings

Check maven's current configuration in effect

2.2 mvn -X

Check the reading order of settings.xml (there will be multiple in the environment, read them in order)

3. Solve 

Modify the maven environment variable in the environment variable Path to the new maven address

Guess you like

Origin blog.csdn.net/pp_lan/article/details/128445380