IDEA无法下载远程仓库jar包问题

59 篇文章 3 订阅
37 篇文章 1 订阅

 问题描述:

idea无法下载远程仓库jar包,最奇怪的是idea有多个项目,有些项目可以下载,有些项目不行。报错如下:

一开始:

unable to find valid certification path to requested target

Try run Maven import with -U flag (force update snapshots)

重新reload mave项目后:

org.json:json:pom:20160810 failed to transfer from https://********/maven-release/ during a previous attempt.

This failure was cached in the local repository and resolution is not reattempted until the update interval of artifactory-repo has elapsed or updates are forced.

Original error: Could not transfer artifact org.json:json:pom:20160810 from/to artifactory-repo (https://****************/maven-release/):

transfer failed for https://**********************/maven-release/org/json/json/20160810/json-20160810.pom

Try run Maven import with -U flag (force update snapshots)

 删掉本次下载的错误文件后又变成:

 

 

unable to find valid certification path to requested target

Try run Maven import with -U flag (force update snapshots)

通过上面可以知道第二个报错的原因是因为本地已经存在.lastupdate文件引起的。因为删除以后就不报那个错了。

所以可以大概猜出报错原因是因为证书问题。从报错unable to find valid certification path to requested target可以看出来。

于是开始处理证书问题:

在file->settings->Maven->Importing下的VM加上以下代码(下载jar包忽略证书)

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

在这里插入图片描述

于是乎问题得到解决。

参考文章:

Maven依赖下载报错 unable to find valid certification path to requested target_maven unable to find valid certification path to r-CSDN博客

idea maven unable to find valid certification path to requested target..._idea unable to find valid certification path to re-CSDN博客

  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值