项目更改版本号之后打包失败 resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced
在修改项目的版本号之后,如pom.xml中<version>1.2.0-SNAPSHOT</version>替换为<version>1.0.0-RELEASE</version>后,执行打包报错如下:
·················resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]
项目jar包是放在nexus上的,这是由于私服的更新策略导致的,nexus上的依赖库在更新库版本号打包时并没有更新,导致项目打包找不到依赖。
解决方法:
方法一: 修改nexus的依赖库更新策略,添加 <updatePolicy>always</updatePolicy>

<profile>
<id>zang-nexus</id>
<repositories>
<repository>
<id>zang-nexus</id>
<url>http://10.253.40.2XX:6XXX/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories> <pluginRepositories>
<pluginRepository>
<id>zang-nexus</id>
<url>http://10.253.40.2XX:6XXX/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
方法二:删除未下载成功的文件,重新编译
maven默认会使用本地缓存的库来编译工程,对于上次下载失败的库,maven会在Repository/<group>/<artifact>/<version>/目录下创建xxx.lastUpdated文件,一旦这个文件存在,那么在直到下一次nexus更新之前都不会更新这个依赖库,所以可以根据报错信息,删除Repository/<group>/<artifact>/<version>/目录下的*.lastUpdated文件,然后再次运行mvn compile编译工程。
项目更改版本号之后打包失败 resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced的更多相关文章
- Maven-010-maven 编译报错:Failure to ... in ... was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced.
今晚在编译 maven 项目的时候,命令行报错,出现 Failure to ... in ... 类似错误,详细的错误信息如下所示: [INFO] -------------------------- ...
- Failure to find xxx in xxx was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced @ xxx
问题: 在linux服务器上使用maven编译war时报错: 16:41:35 [FATAL] Non-resolvable parent POM for ***: Failure to find * ...
- resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced
Maven在执行中报错: - Failure to transfer org.slf4j:slf4j-api:jar:1.7.24 from http://localhost:8081/nexus/c ...
- maven 下载jar失败: resolution will not be reattempted until the update interval of central has elapsed or updates are forced
Multiple annotations found at this line: - ArtifactTransferException: Failure to transfer com.faster ...
- was cached in the local repository, resolution will not be reattempted until the update interval of fintech has elapsed or updates are forced
今天使用命令mvn compile编译maven项目时提示错误信息,错误信息如下: [ERROR] Failed to execute goal on project <project_name ...
- was cached in the local repository, resolution will not be reattempted until the update interval of localhost-repository has elapsed or updates are forced
ailed to collect dependencies at com.eshore:common:jar:0.0.1-SNAPSHOT: Failed to read artifact descr ...
- resolution will not be reattempted until the update interval of repository-group has elapsed or updates are forced
Failed to execute goal on project safetan-web: Could not resolve dependencies for project com.safeta ...
- maven执行报错resolution will not be reattempted until the update interval of nexus h
maven在执行过程中抛错: 引用 ... was cached in the local repository, resolution will not be reattempted until t ...
- maven问题-"resolution will not be reattempted until the update interval of MyRepo has elapsed"
最近在家里写maven程序的时候老是出现问题,有些问题到了公司就突然消失了. 在修改pom文件后保存的反应还是比较明显的,家里的网遇到有些依赖根本下载不了..墙. 但是到了公司,不但速度快,几乎啥都能 ...
随机推荐
- MVC中导航菜单,选中项的高亮问题。
这个菜单是放在母板页的.比如当前选中的是异常业务监控.如果页面刷新了.就会变成第一张图..选择其他的选项也会,因为页面会刷新嘛.. 怎么处理这个问题了? 答案是记录当前页面的url. 有两种解决思 ...
- log4net修改数据库连接字符串和写自定义信息
最近项目需要用log4net来写日志,因为整个平台式在sharepoint上,我们需要记录具体是哪个子站点发生的日志,因此需要再原来的log表里面添加一个自定义信息列.由于平台的安全性要求,我们需要对 ...
- ISP图像处理&&相机系统
如何理解 ISO.快门.光圈.曝光这几个概念? 摄影基础篇——彻底弄清光圈.快门与ISO 理解这三个参数各自都是如何控制进入的光线量: 快门速度一般的表示方法是1/100s.1/30s.2s: 小的“ ...
- gradlew 命令行 build 调试 构建错误 Manifest merger failed MD
Markdown版本笔记 我的GitHub首页 我的博客 我的微信 我的邮箱 MyAndroidBlogs baiqiantao baiqiantao bqt20094 baiqiantao@sina ...
- 构建-14 Gradle使用技巧
官方文档 Gradle 提示与诀窍 [Gradle tips and recipes] Gradle 和 Android Plugin for Gradle 提供了一种灵活的方式[a flexible ...
- JS弹出层遮罩,隐藏背景页面滚动条细节优化
做过弹层组件的童鞋应该都考虑过特殊情况下取消页面滚动条,让其不能滚动,这样用户体验会好很多,当弹层内容超出屏幕展现范围的时候在弹层上面增加滚动条来查看全部内容. 一.去除滚动条方法给body添加ove ...
- Android传感器应用——重力传感器实现滚动的弹球
一. 问题描述 Android中有多达11种传感器,不同的手机设备支持的传感器类型也不尽相同 1. 重力传感器 GV-sensor 2. 加速度传感器 G-sensor 3. 磁力传感器 M-se ...
- Android -- Volley解析
Volley设计 Dispatch Thread不断从RequestQueue中取出请求,根据是否已缓存调用Cache或Network这两类数据获取接口之一,从内存缓存或是服务器取得请求的数据,然后交 ...
- 浅谈APP流式分页服务端设计(转)
http://www.jianshu.com/p/13941129c826 a.cursor游标式分页 select * from table where id >cursor limit pa ...
- ios 内存管理总结
在ios 中 项目有两个内存管理方式 第一种,arc 方式,编译器编译时,自动给obj 加上 release 实现要求 1. 设置项目 将 Objective-C Automatic Referen ...