The POM for XXX:jar:${com.ld.base.service.version} is missing, no dependency information available

本文描述了一个因jar包更名而导致Maven项目依赖错误的问题,作者尝试多种方式清除缓存和更新依赖未果,最终通过手动添加不存在的依赖解决了打包时的警告与错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近有个jar改了名字后,有个依赖它的工程死活引用的是老名字,导致打包的时候出错,如下所示:

[INFO] ------------------------------------------------------------------------
[INFO] Building com.ld.base.runtime 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.jxls:jxls:jar:1.0.8 is missing, no dependency information available
[WARNING] The POM for com.ld.base:com.ld.base.service:jar:${com.ld.base.service.version} is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.644 s
[INFO] Finished at: 2016-11-21T12:02:22+08:00
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project com.ld.base.runtime: Could not resolve dependencies for project com.ld.base:com.ld.base.runtime:war:1.0.0-SNAPSHOT: Failure to find com.ld.base:com.ld.base.service:jar:${com.ld.base.service.version} in https://repo.maven.apache.org/maven2 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]
[ERROR]

仔细检查了,肯定没有引用了,并且本地仓库、可能的classpath都删除重新force update了、工程都删除重新从svn更新了,还是报这个错。

最后实在没辙,通过人工添加个不存在引用来绕过去,如下所示:

<properties>
<com.ld.base.service.version>1.0.0-SNAPSHOT</com.ld.base.service.version>
</properties>

<dependency>
<groupId>com.ld.base</groupId>
<artifactId>com.ld.base.service</artifactId>
<version>${com.ld.base.service.version}</version>
<scope>system</scope>
<systemPath>d:/jar/com.ld.base.service-1.0.0-SNAPSHOT.jar</systemPath>
</dependency>

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值