maven--解决was cached in the local repository, resolution will not be reattempted until the update
原文网址:maven--解决was cached in the local repository, resolution will not be reattempted until the update_IT利刃出鞘的博客-CSDN博客
简介
本文介绍解决was cached in the local repository, resolution will not be reattempted until the update ...的方法。
问题描述
用maven打包时,发现如下报错:
[ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for project xxx:jar:0.0.1: Failure to find yyy:zzz:jar:1.0.0 in http://xxx:8081/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
原因分析
Maven默认会使用本地缓存的库来编译工程,对于上次下载失败的库,maven会在~/.m2/repository/<group>/<artifact>/<version>/目录下创建xxx.lastUpdated文件。
一旦这个文件存在,那么在直到下一次nexus更新之前都不会更新这个依赖库。
解决方案
方案1:maven命令后加-U参数
如:mvn clean package -U
详解
-U参数会强制update本地的jar(不用再专门去删除)
-U,--update-snapshots :
Forces a check for missing releases and updated snapshots on remote repositories.
方案2:删除*.lastUpdated文件
删除~/.m2/repository/对应目录或目录下的*.lastUpdated文件,然后再次运行maven命令
方案3:repository添加updatePolicy属性
可以强制每次都更新依赖库,方法是:将repository标签添加如下属性:
<updatePolicy>always</updatePolicy>
updatePolicy可以设置为”always”、”daily” (默认)、”interval:XXX” (分钟)或”never”。
可以在pom.xml或者settings.xml里修改。
例如:
<repositories><repository><id>io.spring.repo.maven.release</id><url>http://repo.spring.io/release/</url><releases><enabled>true</enabled><updatePolicy>always</updatePolicy></releases><snapshots><enabled>false</enabled></snapshots></repository>
</repositories>
maven--解决was cached in the local repository, resolution will not be reattempted until the update相关推荐
- Maven was cached in the local repository, resolution will not be reattempted until the update interv
问题描述 在使用公司内部的maven仓库编译项目时,由于新加入了几个依赖包,第一次编译失败了,此后在修复了公司内部maven仓库后编译项目出现错误 was cached in the local re ...
- cached in the local repository, resolution will not be reattempted until the update interval of RIIL
maven更新项目的时候,在还没有下载完成就终止了,第二次从本地导入项目的时候,pom文件报错,提示说是cached in the local repository, resolution will ...
- was cached in the local repository, resolution will not be reattempted until the update interval
使用maven构建项目时,报如上错误. 原因 Maven默认会使用本地缓存的库来编译工程,对于上次下载失败的库,maven会在本地仓库包对应的目录下创建xxx.lastUpdated文件,一旦这个文件 ...
- Maven经典错误之三:was cached in the local repository, resolution will not be reattempted until the upda
常见错误: Multiple annotations found at this line: - No plugin found for prefix 'war' in the current pro ...
- git 报错:was cached in the local repository, resolution will not be reattempted until the upda
前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. Could not resolve dependencies for project com.for ...
- 解决 Maven 报错 Non-resolvable parent POM ... was cached in the local repository, resolution will not be
解决 Maven 报错 Non-resolvable parent POM ... was cached in the local repository, resolution will not be ...
- 排查maven中可以从远程下载下来jar包,但是却报错Failure to find was cached in the local repository, resolution will not
一.问题 maven打包的过程中报错如下: Failure to find cfca:backport-util-concurrent:pom:3.1 in http://maven.company. ...
- Failure to find com.rongpd:rpd:pom:1.0 in xxx was cached in the local repository, resolution will no
2019独角兽企业重金招聘Python工程师标准>>> 搞 maven install 模块的时候报错: Failure to find com.rongpd:rpd:pom:1.0 ...
- maven编译项目时提示:cached in the local repository
1.今天使用命令mvn compile编译maven项目时提示错误信息,部分错误信息如下: Failure to transfer wsdl4j:wsdl4j:jar:1.6.3 from http: ...
- Maven: Non-resolvable import POM:Failure to find *** in *** was cached in the local repository.
2019独角兽企业重金招聘Python工程师标准>>> clean or package spring cloud 项目时,IDE 打印如下报错: Non-resolvable im ...
最新文章
- java虚拟机内存比例,【Java虚拟机】堆内存分配策略总结
- 滴滴进入寒冬期,将裁员2000人
- 教你清楚了解JAVA动态代理
- 【C#】三维立体验证码 (3DCaptcha)
- eBay Notification介绍
- 数据结构---二叉平衡排序树的删除
- rcp rapido_为什么气流非常适合Rapido
- PHP十六个魔术方法
- 为什么 HTTPS 比 HTTP 更安全?
- B区考研学校排名计算机,b区(b区考研学校排名)
- 图像检索算法 TODO
- Radon变换与Matlab代码
- 【论文阅读】PV-RCNN: Point-Voxel Feature Set Abstraction for 3D Object Detection
- 前端开发app程序 用什么模拟器测试安卓_【移动端测试】安卓模拟器简介和adb使用...
- jqGrid双击事件,并获取双击行的各个属性值
- python pandas多条件筛选
- 机器学习(七)音频可视化第一篇
- 小米将推出新款自研芯片
- JDK内置注解元注解++反射
- 深入剖析Spring Web源码(十九) - 整理的文档和日志的索引(第一版)
热门文章
- 微信网页开发调试的一些方法
- Ubuntu16.04如何设置静态IP地址
- yaaw 错误 “No such method: aria2.addTorrent”的解决办法
- 实现微信自动回复看电影!
- 利用Python下载网页视频
- 3.STC15W408AS单片机GPIO
- [Google] 再见 SharedPreferences 拥抱 Jetpack DataStore
- 今晚8点,dotnet课堂全新起航,张善友/陈计节/刘腾飞我们一起来聊聊abp的故事...
- 用postman GET调试阿里云银行卡二、三、四要素实名认证
- matlab偏导数方程,利用Matlab求解不同类型的偏微分方程