项目更改版本号之后打包失败 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文件后保存的反应还是比较明显的,家里的网遇到有些依赖根本下载不了..墙. 但是到了公司,不但速度快,几乎啥都能 ...
随机推荐
- 第十三章 redis-cluster原理
一.基本定义 虚拟槽slot分区算法,优点是扩容缩容简单:直接把slot及每个slot上的数据进行缩放即可 redis定义了0-16383(总共为16384个slot,即214个slot) slot会 ...
- jquery实现上传文件大小类型的验证
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...
- CSS 中的字体兼容写法:用CSS为英文和中文字体分别设置不同的字体
font-family的调用方法: font-family:Arial,'Times New Roman','Microsoft YaHei',SimHei; font:bold 12px/.75em ...
- 【Spark】SparkStreaming-高可用-HA-Master
SparkStreaming-高可用-HA-Master sparkstreaming master 高可用_百度搜索 Spark:Master High Availability(HA)高可用配置的 ...
- VIM的buffers
原文:http://ju.outofmemory.cn/entry/13522 重新在不同的 tab 中打开多个关闭的buffer 文件, https://stackoverflow.com/ques ...
- MongoDB server side Javascript 如何直接传入字符串?
MongoDB server side Javascript的介绍如下: https://docs.mongodb.com/v3.0/core/server-side-javascript/#runn ...
- IDEA注册码和license服务器附使用方法
以下两种方式均可激活intellij Idea 15和16版本 最上方点击,Help->Registet 1.注册码 43B4A73YYJ-eyJsaWNlbnNlSWQiOiI0M0I0QTc ...
- MyBatis 作用域和生命周期
理解到目前为止所讨论的类的作用域和生命周期是非常重要的.如果使用不当可导致严重的并发性问题. SqlSessionFactoryBuilder 这个类可以在任何时候被实例化.使用和销毁.一旦您创造了 ...
- android中RecyclerView控件实现瀑布流布局
本文是在之前文章的基础上做的修改:android中RecyclerView控件的使用 1.修改列表项news_item.xml: <?xml version="1.0" en ...
- LintCode: Binary Tree Postorder Traversal
C++,递归 /** * Definition of TreeNode: * class TreeNode { * public: * int val; * TreeNode *left, *righ ...