maven - 集成 Gitlab 时出错 - Maven - Jfrog artivatory
问题描述
使用此处提供的说明https://jfrog.com/blog/gitlab-and-artifactory-on-your-mark-get-set-build/,
- 将https://github.com/JFrog/project-examples/tree/master/gitlabci-example/gitlabci-maven-artifactory复制到我的新项目中
- 在 JFROG 中创建了通用本地仓库
- 设置所有需要的变量(ARTIFACTORY_PASS、ARTIFACTORY_URL、ARTIFACTORY_USER、MAVEN_REPO_KEY
- CI 开始工作时出现错误:
[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 克隆,无需修改
解决方案
在 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
推荐阅读
- mysql - SQL 分配与日期时间重叠的信用
- arrays - 最新日期/唯一 ID 的 Google 表格数组/过滤器
- python - 带有散景小部件的 Holoviews AdjointLayout
- matplotlib - \frac{}{} 在 plt.text 中不起作用?
- db2 - 导出的时间戳在加载回数据库后正在更改值
- c# - 如何处理继承的 ViewModel 中的 MustOverride(虚拟)属性
- asp.net-core-mvc - .Models 没有出现在使用 ProjectName 中。asp core2 空应用程序中的“Models”
- javascript - 二叉搜索树序列化格式
- android - 每当我滑动到新页面时,Viewpager 都会向下滚动
- sql - SQL Server 使用 order by 子句显着提高了选择性能