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镜像资源可以设置为:

<mirrors>
<!-- 阿里云仓库 -->
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<!-- junit镜像地址 -->
<mirror>
<id>junit</id>
<name>junit Address/</name>
<url>http://jcenter.bintray.com/</url>
<mirrorOf>central</mirrorOf>
</mirror>
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://central.maven.org/maven2</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>

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的仓库的文件夹的访问权限不够,添加写入权限。

 

 

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM