java - Maven 找不到缓存的工件被缓存在本地存储库中
问题描述
我在 Artifactory 中有一个 Maven 神器。我试图在我的一个 Maven 项目中引用它。我有如下所示的依赖元素。
<dependency>
<groupId>com.ci.servicemanager</groupId>
<artifactId>ci-service-manager</artifactId>
<version>LATEST</version>
</dependency>
但它因以下显示的错误而失败。
[ERROR] Failed to execute goal on project integration-tests: Could not resolve dependencies for project intelligence:integration-tests:jar:1.0-SNAPSHOT: Failure to find com.ci.servicemanager:ci-service-manager:all-jar:8126251 in https://artifactory.mkn.ci.cloud/artifactory/CI-Release-Local was cached in the local repository, resolution will not be reattempted until the update interval of CI-Release-Local has elapsed or updates are forced -> [Help 1]
当我到达我的本地仓库时,我可以按照所示方式看到下载工件。
csv2980:8126251 mmacilamany$ ls -al
total 48
drwxr-xr-x 8 mmacilamany admin 256 Apr 30 15:48 .
drwxr-xr-x 6 mmacilamany admin 192 Apr 30 15:33 ..
-rw-r--r-- 1 mmacilamany admin 183 Apr 30 15:33 _remote.repositories
-rw-r--r-- 1 mmacilamany admin 297 Apr 30 15:48 ci-service-manager-8126251.all-.lastUpdated
-rw-r--r-- 1 mmacilamany admin 297 Apr 30 15:48 ci-service-manager-8126251.all-jar.lastUpdated
-rw-r--r-- 1 mmacilamany admin 297 Apr 30 15:33 ci-service-manager-8126251.jar.lastUpdated
-rw-r--r-- 1 mmacilamany staff 461 Apr 30 15:33 ci-service-manager-8126251.pom
-rw-r--r-- 1 mmacilamany staff 40 Apr 30 15:33 ci-service-manager-8126251.pom.sha1
虽然 jars 正在下载,但为什么会出现错误?我尝试删除本地 repo 工件并重试。仍然没有运气。任何帮助将非常感激。
编辑:当我删除本地 repo 时,maven 正在尝试从此 url 下载,下载:https ://artifactory.mkn.ci.cloud/artifactory/CI-Release-Local/com/ci/servicemanager/ci-service-经理/8126251/ci-service-manager-8126251.jar。但实际可下载的 URL 看起来像。
不同之处在于实际上传的文件名中多了一个“-all.jar”。我该如何处理这种情况。
解决方案
推荐阅读
- c# - WPF 全局热键未注册
- sql - 为我定义的函数创建触发器时,Postgres SQL 中的语法错误?
- java - 如何绕过或禁用 Ssl 握手错误
- android - 检查数据状态是否完全写入文件?
- c# - 无法让 InvokedItemContainer 与 Android 一起使用
- azure - 构建 docker 映像时无法在 Azure DevOps(工件)中授权
- firebase - 如何允许 Firebase RTB 架构中组织对象的“所有者”对属于该组的所有“用户”进行 .read 访问?
- c++ - boost::filesystem 获取当前目录中的所有文件 - Windows
- java - 如何正确从 HashMap 加载到 html 表?
- python - ImportError:使用 Kalibr 时没有名为 json 的模块