failed to transfer from https://repo.maven.apache.org/maven2错误解决

Posted 格子衫111

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了failed to transfer from https://repo.maven.apache.org/maven2错误解决相关的知识,希望对你有一定的参考价值。

问题描述:
IDEA导入maven项目后,下载jar包的时候,控制台报错,报错信息如下:
org.springframework.boot:spring-boot-starter-parent:pom:2.7.3 failed to transfer from https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.7.3 from/to central (https://repo.maven.apache.org/maven2): transfer failed for https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.7.3/spring-boot-starter-parent-2.7.3.pom

原因:
没有设置IDEA中的maven配置,还是默认的样子,所以IDEA会自然地去“https://repo.maven.apache.org/maven2”这个路径找jar包,那么就会出现解析不了的情况

解决方案:
修改IDEA的maven配置即可,修改后如下:

然后重新加载依赖,即可解决

以上是关于failed to transfer from https://repo.maven.apache.org/maven2错误解决的主要内容,如果未能解决你的问题,请参考以下文章

mavenmvn deploy 报错 Failed to deploy artifacts: Could not transfer artifact

Resource interpreted as Stylesheet but transferred with MIME || DevTools failed to parse Source

Transfer Learning from Speaker Verification to Multispeaker Text-To-Speech Synthesis论文阅读

解决:Failure to transfer org.apache.maven.plugins:maven-jar-plugin:pom:2.4 from错误

ArtifactTransferException: Failure to transfer javassist:javassist:jar:3.11.0.GA from http://repo.ma

解决maven项目的:Failure to transfer org.apache.maven:maven-archiver:jar:x.x from https://repo.maven.apach