maven项目不能自动更新jar(造成jar缺失的问题)

本文介绍了解决Maven项目中出现的依赖丢失及配置错误的方法,包括删除错误的jar包并重新下载,以及清理失败的配置缓存。

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

1、问题如下:

 The container 'Maven Dependencies' references non existing library '/Users/xxx/.m2/repository/ognl/ognl/3.0.8/ognl-3.0.8.jar'xxx-xxx Build pathBuild Path Problem

2、解决措施,删除资源库里 出错的jar rm -rf ognl-3.0.8.jar.lastUpdated,之后maven 重新更新整个工程。(未能解决)---->删除,3.0.8整个文件夹,再次更新,解决问题。

另外的一个问题:

问题如下:

Description Resource Path Location Type
Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:2.18.1 from http://maven.aliyun.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus-aliyun has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.18.1 from/to nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public): The operation was cancelled. pom.xml /项目名字 line 1 Maven Configuration Problem

解决措施:

删除所有下载失败的文件:

linux环境下:find /Users/riibon/.m2/ -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值