使用IDEA配置SpringBoot项目报错Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2

本文介绍了在IDEA中新建SpringBoot项目时遇到的依赖下载失败问题,详细错误信息涉及到阿里云仓库和证书。作者尝试了多种解决方案,如修改Maven配置、忽略证书验证等,最终发现是因为本地仓库中存在旧版本的spring-boot-starter-parent包导致的冲突。通过删除本地仓库的相关文件并重新加载项目,成功解决了问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在IDEA中新建一个SpringBoot项目时报错

Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.6.7 from https://maven.aliyun.com/nexus/content/repositories/central/ was cached in the local repository, resolution will not be reattempted until the update interval of alimaven has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.6.7 from/to alimaven (https://maven.aliyun.com/nexus/content/repositories/central/): java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

网上查,试过了在Maven的setting.xml中注释掉镜像-----未解决
也能够进入阿里云仓库,网络正常
也忽略了证书验证打包

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

忽略证书验证打包问题

然后看了下上面报错的内容
其中有was cached in the local repository,猜想可能是因为之前使用过2.3.4的版本,导致org.springframework.boot包下已有文件
于是删除org.springframework.boot下的所有文件,再重新加载Maven项目就解决了

评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值