当前位置: 首页 > news >正文

Maven管理项目,本地仓库有对应的jar包,但还是报找不到

文章目录

    • 业务场景
    • 错误提示
    • 分析过程
    • 解决办法

业务场景

settings.xml种配置了私服,但是有些依赖私服上没有,通过同事拷贝过来的。但是用maven打包时报红了。

错误提示

Idea Maven错误:was cached in the local repository, resolution will not be reattempted until the update

was cached in the local repository, resolution will not be reattempted until the update interval of io.spring.repo.maven.release has elapsed or updates are forced

This failure was cached in the local repository and resolution is not reattempted until the update interval of repo183 has elapsed or updates are forced

[ERROR] Failed to execute goal on project XXX: Could not resolve dependencies for project com.vixtel.project:boce-subscriber:jar:2.1.0-20230908: com.vixtel.vaf:vaf-nacos-config-precheck:jar:2.4.0-20230801 was not found in http://36.134.39.183:4000/repository/maven-public/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of repo183 has elapsed or updates are forced

分析过程

  1. 按照提示,查找本地repository中是否有缺失的jar,但jar都是有的,同事拷贝的都有jar文件
  2. 参考几篇文章:maven依赖报红。解决本地有jar包,idea无法加载
    _remote.repositories文件的作用
    使用Maven管理项目时,明明本地仓库有对应的jar包,但还是报找不到
    快速清理本地仓库的文件

解释:maven3.x版本从远程库下载依赖后,会生成对应的_remote.repositories文件,标示该资源的来源。如果你有这个文件_remote.repositories,那就不会访问本地了,会去远程上找。必须远程上有才行,否则就会报错。

而我们的私服是没有依赖的,直接拷贝到的本地。

解决办法

删除对应仓库中的_remote.repositories文件

如果多可以使用快速清理本地仓库的文件

http://www.lryc.cn/news/307258.html

相关文章:

  • 手写JavaScript中的Promise.all方法(JS中Promise.all的执行过程)
  • IP设置教程
  • 【Azure 架构师学习笔记】-Azure Synapse -- Link for SQL 实时数据加载
  • k8s(5)
  • 【服务器数据恢复】ext3文件系统下硬盘坏道掉线的数据恢复案例
  • Sentinel 动态规则扩展
  • UE5 UE4 自定义插件自动开启关联插件(plugin enable)
  • Android摄像头横屏的时候_人脸预览横向显示_问题解决---Android原生开发工作笔记164
  • 网络安全防御保护 Day6
  • 自动驾驶消息传输机制-LCM
  • 架构设计实践:熟悉架构设计方法论,并动手绘制架构设计图
  • 【推荐算法系列十六】:协同过滤
  • linux动态库加载相关
  • python 基础绘图函数 实例
  • 28. 找出字符串中第一个匹配项的下标(力扣LeetCode)
  • 1 开源鸿蒙OpenHarmony niobe407 STM32F407IGT6芯片轻型系统全量源码4.1版本下载流程
  • 洛谷C++简单题小练习day21—梦境数数小程序
  • LabVIEW高精度闭式微小型循环泵性能测试
  • 同局域网共享虚拟机(VMware)
  • docker学习快速入门
  • 大语言模型LLM推理加速:LangChain与ChatGLM3-6B的推理加速技术(LLM系列11)
  • GSVA -- 学习记录
  • 基于Springboot的旅游网管理系统设计与实现(有报告)。Javaee项目,springboot项目。
  • Docker基础篇(六) dockerfile体系结构语法
  • 【Python编程+数据清洗+Pandas库+数据分析】
  • 网络安全之防御保护8 - 11 天笔记
  • LiveGBS流媒体平台GB/T28181功能-查看国标设备下通道会话列表直播|回放|对讲|播放|录像|级联UDP|TCP|H264|H265会话
  • Python和Jupyter简介
  • Linux——静态库
  • fastjson序列化MessageExt对象问题(1.2.78之前版本)