在修改项目的版本号之后,如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的更多相关文章

  1. 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] -------------------------- ...

  2. 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 * ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  8. 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 ...

  9. maven问题-"resolution will not be reattempted until the update interval of MyRepo has elapsed"

    最近在家里写maven程序的时候老是出现问题,有些问题到了公司就突然消失了. 在修改pom文件后保存的反应还是比较明显的,家里的网遇到有些依赖根本下载不了..墙. 但是到了公司,不但速度快,几乎啥都能 ...

随机推荐

  1. C/C++ 分支预测(likely unlikely)

    看一些代码时,会遇到likely unlikely, 查了查网上的资料,结合自己的理解记录一下. 1. 一些概念 指令周期是指执行一条指令所需要的时间,一般由若干个机器周期组成,是从取指令.分析指令到 ...

  2. 用VS自带的打包程序打包Web程序,安装时安装中断

    出现这种问题,可能是你的IIS的兼容性问题: 把IIS兼容性安装好,再试试,应该可以了.

  3. (转)C# SendMessage 参数与例子

    原文:http://hi.baidu.com/ytmeng/blog/item/25f5de5157931a888c543001.html using System;using System.IO;u ...

  4. 用eclipse 玩转cocos 2dx开发

    开始研究cocos2dx,mark一下这个的配置步骤 1 下载eclipse      2 下载android sdk,配置sdk路径,添加环境变量 3 安装adt 4 下载android ndk,配 ...

  5. NLP常用信息资源

    ACL Anthology,囊括了ACL,EMNLP,CL等NLP领域重要会议和期刊的论文.http://www.aclweb.org/anthology-new/ LDC: The Linguist ...

  6. OpenGL book list

      From: https://www.codeproject.com/Articles/771225/Learning-Modern-OpenGL   A little guide about mo ...

  7. JAVA对图片的任意角度旋转,以及镜像操作

    package relevantTest;/* * 该代码实现了对图像的水平镜像变换,垂直镜像变换,任意角度旋转,jtf的实时监控,以及对图像的缩放变换,以及按钮的若隐若现效果. * 在对图像进行任意 ...

  8. 在java中像js那样处理json数据

    工作中经常需要通过ajax向前台返回json数据,都是通过拼字符串拼出来的,很发麻烦不说,还容易出错. 于是想,能不能像js那样操作json呢?或者说更方便的操作呢? Google的gson就是这样的 ...

  9. 迅为4412开发板Linux驱动教程——编写简单应用调用驱动

    Linux驱动教程:http://pan.baidu.com/s/1c0hljUS 编写简单应用调用驱动--头文件 • 打印头文件 – include <stdio.h>调用打印函数pri ...

  10. Windows 环境 cygwin 安装 SSH

    本文内容 安装环境 安装 cygwin 安装 SSH 服务 启动 sshd 服务 SSH 免密码登录 验证 SSH 是否已安装成功 验证 SSH 是否可以免密码登录本机 安装环境 Windows 20 ...