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





