Artifactory 中部署的工件未显示在虚拟存储库中
Posted
技术标签:
【中文标题】Artifactory 中部署的工件未显示在虚拟存储库中【英文标题】:Deployed artefact in Artifcatory does not show up in virtual repo 【发布时间】:2017-10-24 13:50:21 【问题描述】:我有一个人工制品 (com.test#verifier;1.1
),我将它部署在名为 libs-release-local
的存储库上。这个 repo 有 Virtual Repository Association
,其中一个叫做 libs-release
(这是我理解的 Artifactory 给出的默认值)。
在我的项目中,我在ivy-settings.xml
中有以下内容
<resolvers>
<chain name="main">
<url name="artifactory" m2compatible="false">
<artifact
pattern="$ivy.artifactory.server/$ivy.repo/$ivy.default.artifact.pattern" />
<ivy
pattern="$ivy.artifactory.server/$ivy.repo/$ivy.default.ivy.pattern" />
</url>
<ibiblio name="public" m2compatible="true"
root="http://artifactory:9090/artifactory/libs-release" />
</chain>
获取人工制品时,它失败了,但
[ivy:retrieve] module not found: com.test#verifier;1.1
[ivy:retrieve] ==== artifactory: tried
[ivy:retrieve] http://artifactory:9090/artifactory/unstable/com.test/verifier/1.1/ivys/ivy-1.1.xml
[ivy:retrieve] -- artifact com.test#verifier;1.1!verifier.jar:
[ivy:retrieve] http://artifactory:9090/artifactory/unstable/com.test/verifier/1.1/jars/verifier-1.1.jar
[ivy:retrieve] ==== public: tried
[ivy:retrieve] http://artifactory:9090/artifactory/libs-release/com/test/verifier/1.1/verifier-1.1.pom
[ivy:retrieve] -- artifact com.test#verifier;1.1!verifier.jar:
[ivy:retrieve] http://artifactory:9090/artifactory/libs-release/com/test/verifier/1.1/verifier-1.1.jar
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: UNRESOLVED DEPENDENCIES ::
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :: com.test#verifier;1.1: not found
[ivy:retrieve] ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]
[ivy:retrieve] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
显然我的假设是错误的,当我部署到libs-release-local
时,它也可以通过libs-release
访问。
我需要做什么,使用给定的常春藤设置,我确实收到了依赖关系?
【问题讨论】:
您是否设法从 libs-release-local 解决了工件?您是否尝试过使用 curl 从 libs-release 解决工件? 当我将 ivy-settings.xml 更改为使用libs-release-local
时,我能否成功解决依赖关系
你能追踪到虚拟仓库的请求吗 - artifactory:9090/artifactory/libs-release/com/test/verifier/1.1/…
我在此处将失败的跟踪上传到 libs-release:dropbox.com/s/a0bc2dladwmcky3/trace.txt?dl=0 并将成功的跟踪上传到 libs-release-local:dropbox.com/s/t2tyxg15t1hhx7r/trace-found.txt?dl=0
【参考方案1】:
根据提供的请求跟踪,问题在于为 libs-release 存储库配置的包含/排除模式:
2017-05-30T09:33:57.915+02:00 Adding no aggregated repositories - requested artifact is rejected by the include exclude patterns of 'libs-release'
您应该查看 libs-release 存储库配置并检查导致文件下载被拒绝的模式。
【讨论】:
以上是关于Artifactory 中部署的工件未显示在虚拟存储库中的主要内容,如果未能解决你的问题,请参考以下文章
使用 Artifactory Jenkins 插件从嵌套项目部署工件
Artifactory 如何使用 SHA-256 进行安全存储?