IDEA maven报错 Could not transfer artifact from/to xxx (系统找不到指定的路径。)


新手装好maven之后,第一个maven项目创建完成,构建报错如下:

Could not transfer artifact
org.springframework.boot:spring-boot-starter-parent:pom:2.3.4.RELEASE
from/to nexus-aliyun
(http://maven.aliyun.com/nexus/content/groups/public): E:\Program
Files\apache-maven-3.6.3\repository\org\springframework\boot\spring-boot-starter-parent\2.3.4.RELEASE\spring-boot-starter-parent-2.3.4.RELEASE.pom.part.lock
(系统找不到指定的路径。)

该如何解决?

网上的方法汇总:

1.首先保证你的setting没问题。

 检查settsings.xml文件里面库的路径和上述Local respository一致。

2.maven镜像资源可以设置为:




alimaven
aliyun maven
http://maven.aliyun.com/nexus/content/repositories/central/
central



junit
junit Address/
http://jcenter.bintray.com/
central


alimaven
aliyun maven
http://central.maven.org/maven2
central

3. 解决证书问题

向File - settings中的maven - importing中添加这句

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

到这里基本就ok了如果还不行,再向File - settings中的maven - Runner中添加这句话:

-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true -DarchetypeCatalog=internal

如果以上的问题都弄了还有问题,那么很有可能就是User用户对你创建的Maven的仓库的文件夹的访问权限不够,添加写入权限。