问题描述
我无法在一台Artifactory服务器上解决两个存储库(ext-releases-local和repo1-cache)。我的构建似乎只解决列表中的最后一个存储库,并忽略第一个。基本上,我在ext-releases-local中拥有项目的依赖关系,它们的传递依赖项可以在名为repo1-cache的远程仓库中找到。所以我需要解决这两个使用Artifactory Gradle插件。以下是我在build.gradle中尝试过的设置:
artifactory {
contextUrl =https:/ /myartifactory.host.com
publish {
repository {
repoKey =myproj-releases-local
username =$ {artifactory_deployer_user}
password = $ {artifactory_deployer_password}
}
}
解析{
知识库{
repoKey =repo1-cache
username =$ {artifactory_reader_user}
password =$ {artifactory_reader_password}
}
储存库{
repoKey =ext-releases-local
username =$ {artifactory_reader_user}
password =$ {artifactory_reader_password}
}
}
}
我希望获得这项工作的任何帮助/建议。 jfrog的网站上没有任何文件说明是否支持解决两个回购协议。如果没有Artifactory Gradle插件,无疑是可行的,但不幸的是,我将通过Bamboo构建,并且Artifactory Gradle插件已成为发布管理的必需。
据我所知,这不被支持。但是,您始终可以在Artifactory上创建一个虚拟存储库,其中包含 ext-releases-local
和 repo1-cache
。 (还有一个名为 / repo
的预定义虚拟存储库,其中包含所有存储库)。作为一个很好的副作用,这可能比在Gradle端声明两个存储库更好。
I have not been able to resolve against two repositories (ext-releases-local and repo1-cache) on one Artifactory server. My build seems to only resolve against the last repository in the list and ignore the first one. Basically, I have my project's dependencies in ext-releases-local, and their transitive dependencies can be found in the remote repository called repo1-cache. So I need to resolve against both using the Artifactory Gradle plugin. Here is the setup that I have tried in my build.gradle:
artifactory {
contextUrl = "https://myartifactory.host.com"
publish {
repository {
repoKey = "myproj-releases-local"
username = "${artifactory_deployer_user}"
password = "${artifactory_deployer_password}"
}
}
resolve {
repository {
repoKey = "repo1-cache"
username = "${artifactory_reader_user}"
password = "${artifactory_reader_password}"
}
repository {
repoKey = "ext-releases-local"
username = "${artifactory_reader_user}"
password = "${artifactory_reader_password}"
}
}
}
I would appreciate any help/advice on getting this to work. There isn't any documentation out on jfrog's website to tell whether resolving to two repos is supported or not. It's definitely possible to do it without the Artifactory Gradle plugin, but unfortunately I will be building via Bamboo, and the Artifactory Gradle plugin has become necessary for release management.
From what I can tell, this isn't supported. However, you can always create a virtual repository on the Artifactory side that includes ext-releases-local
and repo1-cache
. (There is also a predefined virtual repository named /repo
that includes all repositories.) As a nice side effect, this will likely perform better than declaring two repositories on the Gradle side.
这篇关于是否有可能在Artifactory Gradle插件的解析关闭中有多个回购?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!