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. 解决证书问题
IDEA操作步骤: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的仓库的文件夹的访问权限不够,添加写入权限。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 阿里最新开源QwQ-32B,效果媲美deepseek-r1满血版,部署成本又又又降低了!
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧