maven报错was cached in the local repository, resolution will not be reattempted until the update inter

maven报错was cached in the local repository, resolution will not be reattempted until the update inter

终级解决办法

maven 打包时报错如下:

[ERROR] Failed to execute goal on project XXX-file: Could not resolve dependencies for project cn.XXXX-file:jar:3.7.1-SNAPSHOT: The following artifacts could not be resolved: cn.XXXX:jar:1.0.0, XXXX-mcloud:jar:1.0.3: Failure to find cn.xxx.utils:jar:1.0.0 in http://maven.aliyun.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of aliyun has elapsed or updates are forced -> [Help 1]

判断这个包 cn.xxx.utils:jar是不是自己的repostory里的,如果是,在pom里加上自己的repostory,如下:

<repository>
			<id>xxx</id>
			<name>xxx</name>
			<url>http://nexus.xxx.cn/nexus/repository/maven-releases</url>
</repository>

然后执行mvn即可

mvn clean package -U

-U参数会强制update本地的jar(不用再专门去删除)

-U参数说明:在这里插入图片描述

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/100388.html原文链接:https://javaforall.net

赞 (0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • vue.js开发环境搭建

    vue.js开发环境搭建

    2021年9月24日
  • 安全-流量劫持形成的原因

    流量劫持,这种古老的攻击沉寂了一段时间后,最近又开始闹的沸沸扬扬。众多知名品牌的路由器相继爆出存在安全漏洞,引来国内媒体纷纷报道。只要用户没改默认密码,打开一个网页甚至帖子,路由器配置就会被暗中修改。互联网一夜间变得岌岌可危。详解流量劫持的形成原因攻击还是那几种攻击,报道仍是那千篇一律的砖家提醒,以至于大家都麻木了。早已见惯运营商的各种劫持,频繁的广告弹窗,大家也无可奈何。这么多年也没出现…

    2022年4月9日
  • grub引导安装ubuntu_linux开机进grub怎么修复

    grub引导安装ubuntu_linux开机进grub怎么修复Normal07.8磅02falsefalsefalseMicrosoftInternetExplorer4

关注全栈程序员社区公众号