maven的pom文件出现:Failed to read artifact descriptor for org.springframework.boot:*** 或其他jar包解决方法

今天maven导入redis的jar包时,右边maven栏目出现红线警告
所以我进行了处理maven警告常用的方法:
对于有波浪线的dependency,将其从pom中删除,保存后,再撤销回来,一般这样都可以解决问题,但是这次没有效果

我仔细看maven提示的错误,出现Failed to read artifact descriptor for org.springframework.boot:spring-boot-starter-data-redis:jar 错误,我很不解,于是在谷歌上进行搜索:在stackoverflow发现如下处理方法,
在这里插入图片描述
将提示出错的jar包在maven仓库的文件夹里找到,把它删除,然后在idea中重新通过maven导入下载,做完这些后一般可以解决,如果没有解决,重启idea,在看,问题解决,原因是maven没有检测出自己下载的jar包,需要重新添加,使得maven可以识别

S D:\project_vscode\demo> ./mvnw spring-boot:run [INFO] Scanning for projects... Downloading from central: https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/与%20Spring%20Boot%20版本一致/spring-boot-maven-plugin-与%20Spring%20Boot%20版本一致.pom [WARNING] Failed to retrieve plugin descriptor for org.springframework.boot:spring-boot-maven-plugin:Spring Boot 版本一致: Plugin org.springframework.boot:spring-boot-maven-plugin:Spring Boot 版本一致 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.springframework.boot:spring-boot-maven-plugin:pom:Spring Boot 版本一致 (absent): Could not transfer artifact org.springframework.boot:spring-boot-maven-plugin:pom:Spring Boot 版本一致 from/to central (https://repo.maven.apache.org/maven2): status code: 400, reason phrase: Invalid URI (400) [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.519 s [INFO] Finished at: 2025-03-21T23:58:44+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:Spring Boot 版本一致 or one of its dependencies could not be resolved: [ERROR] The following artifacts could not be resolved: org.springframework.boot:spring-boot-maven-plugin:pom:Spring Boot 版本一致 (absent): org.springframework.boot:spring-boot-maven-plugin:pom:Spring Boot 版本一致 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-maven-plugin:pom:Spring Boot 版本一致 from/to central (https://repo.maven.apache.org/maven2): status code: 400, reason phrase: Invalid URI (400) [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
03-22
评论 16
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Hermione Granger

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值