Maven中如何解决Cannot access central in offline mode

本地Maven仓库有所需jar包依然报错,missing………………

既然有这个jar包为什么还会报错呢?

 

查找到对应_remote.repositories文件。内容如下:

#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Wed May 29 10:47:49 CST 2019
rocketmq-0.0.10-20190528.075353-3.pom>nexus=
rocketmq-0.0.10-20190528.075353-3.jar>nexus=

显示当前artifactId是从nexus下载的。而此时我是连不上私服的。

最后把_remote.repositories文件删掉后能构建成功。或者将_remote.repositories文件定义的repositoryID修改为能联系上

的repository仓库地址。

参考:

1.https://stackoverflow.com/questions/32571400/remote-repositories-prevents-maven-from-resolving-remote-parent

2.https://stackoverflow.com/questions/32591187/maven-meaning-of-remote-repositories-file

3.https://stackoverflow.com/questions/16866978/maven-cant-find-my-local-artifacts

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值