在修改项目的版本号之后,如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. (使用STL中的数据结构进行编程7.3.15)UVA 630 Anagrams (II)(求一个单词在字典中出现的次数)

    /* * UVA_630.cpp * * Created on: 2013年11月4日 * Author: Administrator */ #include <iostream> #in ...

  2. 构造读写IRP(转)

    DDK示例中的代码. NTSTATUSFltReadSectors(  IN PDEVICE_OBJECT DeviceObject,  OUT PVOID Buffer,  IN ULONG Len ...

  3. mysql启动报错cannot allocate memory for the buffer pool处理

    今天启动mysql服务器时失败了.去/var/log/mysql/查看error.log,报错信息如下: 160123 22:29:26 InnoDB: Initializing buffer poo ...

  4. C#利用tabControl控件实现多窗体嵌入及关闭

    创建一个主窗体(Formmain).两个副窗体(Form1,Form2);在主窗体中分别添加一个menuStrip控件.tabControl控件,并在menu控件上添加一个主菜单和两个子菜单   继而 ...

  5. 在Asp.Net中使用SmtpMail发送邮件的方法

    在ASP中,就可以通过调用CDONTS组件发送简单邮件,在ASP.Net中,自然也可以.不同的是,.Net Framework中,将这一组件封装到了System.Web.Mail命名空间中. 一个典型 ...

  6. rqnoj-329-刘翔!加油!-二维背包

    注意排除干扰项. 因为价值不会相等,所以价值的多少与本题没有任何关系,. 所以价值为干扰项,所以不用考虑. 二维背包,简单求解. #include<stdio.h> #include< ...

  7. 7.4 Javascript:表单验证-揭开正則表達式的面纱

    用元字符匹配对应的字符类型 创建正則表達式有点像创建字符串字面量,仅仅只是正則表達式出如今一对"/"里 正則表達式中会用到一级元字符.用于连接字母与数字 "." ...

  8. Chromium网页Layer Tree创建过程分析

    在Chromium中.WebKit会创建一个Graphics Layer Tree描写叙述网页.Graphics Layer Tree是和网页渲染相关的一个Tree. 网页渲染终于由Chromium的 ...

  9. ESXI安装时卡在loading ipmi_si_drv的解决方案

    参考:http://x220ak.hatenablog.com/ 在这个界面按下shift+O,输入runweasel noipmiEnabled即可跳过loading ipmi_si_drv的加载

  10. curl_setopt — 设置 cURL 传输选项

    curl_setopt (PHP 4 >= 4.0.2, PHP 5, PHP 7) curl_setopt — 设置 cURL 传输选项 bool curl_setopt ( resource ...