解决 spring-boot-maven-plugin:2.0.3.RELEASE or one of its dependencies co

1,当我使用mvn clean install -D maven.test.skip=true命令执行spring boot项目时,报错如下

[ERROR] Plugin org.springframework.boot:spring-boot-maven-plugin:2.0.3.RELEASE or one of its dependencies could not be resolved: Failure to find org.springframework.boot:spring-boot-maven-plugin:jar:2.0.3.RELEASE in http://mvn.hz.netease.com/artifactory/repo was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

 

2,原因:插件org.springframework.boot:spring-boot-maven-plugin:2.0.3.RELEASE或其中一个依赖项无法解析,找不到缓存在本地仓库中的org.springframework.boot:spring-boot-maven-plugin:jar:2.0.3.RELEASE,在中心的更新间隔过去或强制更新之前,不会再重新尝试解析。

本人之所以产生这种原因,也是因为本人使用的是公司的maven仓库,而公司仓库中并不存在这个依赖包

3,解决方法:

找到maven在本地的配置文件,.m2/settings.xml,将其备份为其它文件名,然后找其它同学复制一份非公司仓库的settings.xml配置文件过来,然后再重新执行mvn clean install即可

注意:在重新执行时,有时有些jar一直无法下载下来,有可能是因为你在几个项目中同时加载jar到新配置仓库中的原因,解决方法:将idea等上执行的maven加载状态停止甚至关闭idea,然后去对应jar要被加载的位置下删除"jar名+.lock文件”,最后重新执行mvn install即可

 

 

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值