iis服务器助手广告广告
返回顶部
首页 > 资讯 > 后端开发 > JAVA >报错: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom
  • 819
分享到

报错: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom

java开发语言经验分享 2023-09-24 11:09:59 819人浏览 泡泡鱼
摘要

在Maven项目中若要导入SpringBoot, 或是创建springBoot项目时,父级依赖的spring-boot-starter-parent通常都会出现 Project ‘org.spring

Maven项目中若要导入SpringBoot, 或是创建springBoot项目时,父级依赖的spring-boot-starter-parent通常都会出现 Project ‘org.springframework.boot:spring-boot-starter-parent:x.x.x’ not foundCould not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom 的错误提示。

问题出现场景

我新建了一个springboot项目, 此时maven的setting配置文件配置的是阿里云的源, 但是突然发现很多包导不进来(但之前并没有出现过这个毛病), 于是reimport,没有效果, 执行clean命令发现报错

Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.7.10.RELEASE from/to alimaven (https://maven.aliyun.com/repository/central): PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

接下来, 我将简单介绍一下排查pom.xml导包出错的通用解决方法:

1. 检查基础配置是否有误

  1. idea的setting配置,maven三处配置
  2. jdk版本与SpringBoot版本是否匹配
    jdk1.8 对应 2.X.X
    jdk.17 对应 3.X.X

2. 设置忽略安全校验

若上述配置都没有问题,则可尝试设置忽略安全校验, 方法如下:
1.在settings—maven中按照以下设置,目的:配置完可忽略安全校验

   代码:-Dmaven.waGon.Http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true

在这里插入图片描述

此时可以先点击以下你的maven项目clean一下(一次不行, 可以再试一两次, 我就是第二回成了)。这个时候,如果你的配置没问题。控制台应该是可以正常的出现下载的界面了。

注:假如你下面的引入已经显示成功了, 但是依赖还是显示报红,没关系,重启项目即可。

3. 手动导入证书

4. 关于Maven项目引用SpringBoot爆红解决方案

来源地址:https://blog.csdn.net/muzi_87/article/details/130216813

--结束END--

本文标题: 报错: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom

本文链接: https://www.lsjlt.com/news/416868.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作