maven 里的 repositories里空的_maven 本地有jar包"Could not resolve dependencies" 错误解决...

59e6d373cb651a744fa08bc8c344ffc6.png

maven构建的时候本地有jar还是报错 ,最近遇到这个问题记录一下解决方法。

先说两种解决办法:

  1. 删除本地仓库中构件目录里的_remote.repositories 和.lastUpdated文件。
  2. 修改_remote.repositories 里面nexus= 为central=

下边是删除文件的两种脚本

1. powershell脚本

powershell 里切换到repo目录 执行

Get-ChildItem 

2. bat批处理

或者 保存下边批处理内容 为"清理.bat",双击这个脚本

@

修改文件内容的脚本暂时没写。┑( ̄Д  ̄)┍

导致问题的原因

maven出错就是换了私服导致的

c094196f55fd163b78e4b953ccaf9783.png

根据出现出错的jar 找到对应的目录查看_remote.repositories内容

#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Tue Nov 24 17:10:29 CST 2020
html2image-0.9.pom>nexus=
html2image-0.9.jar>nexus=

>nexus= 就是之前指定的私服

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值