【SpringBoot使用Maven打包,找不到本地项目的基础jar】

错误信息:
[ERROR] Failed to execute goal on project comment: Could not resolve dependencies for project com.cgzj:comment:jar:1.0.0: Failed to collect dependencies at com.cgzj:base:jar:1.0.0: Failed to read artifact descriptor for com.cgzj:base:jar:1.0.0: The following artifacts could not be resolved: com.cgzj:kwai:pom:1.0.0 (absent): com.cgzj:kwai:pom:1.0.0 was not found in http://maven.aliyun.com/nexus/content/repositories/central/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of alimaven has elapsed or updates are forced -> [Help 1]

解决办法:

打开本地jar所在目录,打开文件_remote.repositories,在下图位置添加nexus

在这里插入图片描述

修改后结果:

貌似是说的本地已经存在,但是还是要去远程看看有没有(最后发现没有,使用本地)

[INFO] Artifact com.cgzj:base:pom:1.0.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [alimaven (http://maven.aliyun.com/nexus/content/repositories/central/, default, releases)]
[INFO] Artifact com.cgzj:base:pom:1.0.0 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from [alimaven (http://maven.aliyun.com/nexus/content/repositories/central/, default, releases)]
[WARNING] The POM for com.cgzj:base:jar:1.0.0 is missing, no dependency information available

刨根问底:为啥加个nexus就可以了?

_REMOTE.REPOSITORIES文件的作用/MAVEN修改SETTING文件后本地仓库缓存了JAR或POM但还是去远程仓库获取

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值