gpt4 book ai didi

java - 从 Artifactory 获取 GAV Artifactory

转载 作者:行者123 更新时间:2023-12-01 21:16:29 24 4
gpt4 key购买 nike

对于给定的groupId、artifactId、版本、分类器和类型,如何使用REST下载相应的artifact?

最佳答案

使用 gavc 搜索获取 URL,然后您可以从那里下载 Artifactory :

GAVC 搜索

Description: Search by Maven coordinates: GroupId, ArtifactId, Version & Classifier. Search must contain at least one argument. Can limit search to specific repositories (local and remote-cache). Since: 2.2.0 Security: Requires a privileged user (can be anonymous) Usage: GET /api/search/gavc?[g=groupId][&a=artifactId][&v=version][&c=classifier][&repos=x[,y]]

Headers (Optionally): X-Result-Detail: info (To add all extra information of the found artifact), X-Result-Detail: properties (to get the properties of the found artifact), X-Result-Detail: info, properties (for both). Produces: application/vnd.org.jfrog.artifactory.search.GavcSearchResult+json

Sample Output:

GET /api/search/gavc?g=org.acme&a=artifact&v=1.0&c=sources&repos=libs-release-local

{

"results": [

{

"uri": "http://localhost:8080/artifactory/api/storage/libs-release-local/org/acme/artifact/1.0/artifact-1.0-sources.jar"

},{

"uri": "http://localhost:8080/artifactory/api/storage/libs-release-local/org/acme/artifactB/1.0/artifactB-1.0-sources.jar"

}

]

}

取自 API-Documenation .

关于java - 从 Artifactory 获取 GAV Artifactory ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39958500/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com