首页 > 解决方案 > 集成 Gitlab 时出错 - Maven - Jfrog artivatory

问题描述

使用此处提供的说明https://jfrog.com/blog/gitlab-and-artifactory-on-your-mark-get-set-build/

[main] ERROR org.apache.maven.cli.MavenCli - Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved:
Could not find artifact org.apache.maven.plugins:maven-clean-plugin:jar:2.5 in artifactory-release (http://192.168.196.20:8082/artifactory/test0-maven-libs-release-local) -> [Help 1]

它显然是试图在本地 repo (192.168 .....) 中找到插件,而不是从 inet 下载它

问题是:我做错了什么以及如何让它从 maven repo 下载插件?毕竟这是一个官方的项目示例,它不起作用......

所有文件均从 GitHub JFROG repo 克隆,无需修改

回购配置

CI/CD 变量

标签: mavengitlabjfrog

解决方案


在 jfrog(2 个本地)中重新创建存储库 + 添加 1 个带有 url https/jcenter.bintray.com 的远程部分解决了这个问题。下载已开始,现在由于 API 不兼容错误而失败

[main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.4:war (default-war) on project gitlab-demo: 
Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.4:war failed: 
Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.4' 
due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: null

推荐阅读