如何从Artifactory存储库下载最新的工件? [英] How to download the latest artifact from Artifactory repository?

查看:95
本文介绍了如何从Artifactory存储库下载最新的工件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要来自人工工厂。该工件需要通过脚本复制到服务器(Linux)。

I need the latest artifact (for example, a snapshot) from a repository in Artifactory. This artifact needs to be copied to a server (Linux) via a script.

我有什么选择?类似于 Wget / SCP ?以及如何获得工件的路径?

What are my options? Something like Wget / SCP? And how do I get the path of the artifact?

我找到了一些需要Artifactory Pro的解决方案。但是我只有Artifactory,没有Artifactory Pro。

I found some solutions which require Artifactory Pro. But I just have Artifactory, not Artifactory Pro.

是否可以在没有UI且没有Pro版本的情况下从Artifactory下载?有什么经验?

Is it possible at all to download from Artifactory without the UI and not having the Pro-Version? What is the experience?

如果那很重要,我正在使用OpenSUSE 12.1(x86_64)。

I'm on OpenSUSE 12.1 (x86_64) if that matters.

推荐答案

Artifactory具有良好的广泛 REST- API 以及几乎可以在UI中完成的所有操作(甚至更多),也可以使用简单的HTTP请求完成。

Artifactory has a good extensive REST-API and almost anything that can be done in the UI (perhaps even more) can also be done using simple HTTP requests.

您提到的功能-检索最新的工件确实需要Pro版本;但也可以通过一些工作和一些基本脚本来实现。

The feature that you mention - retrieving the latest artifact, does indeed require the Pro edition; but it can also be achieved with a bit of work on your side and a few basic scripts.

选择1-搜索:

执行 GAVC 搜索一组组ID和工件ID坐标,以检索该组的所有现有版本;那么您可以使用任何版本字符串比较算法来确定最新版本。

Perform a GAVC search on a set of group ID and artifact ID coordinates to retrieve all existing versions of that set; then you can use any version string comparison algorithm to determine the latest version.

选项2-Maven方法:

Artifactory生成标准 XML元数据将由Maven使用,因为Maven面临着相同的问题-确定最新版本;元数据列出了工件的所有可用版本,并为每个工件级别的文件夹生成;通过简单的GET请求和一些XML解析,您可以发现最新版本。

Artifactory generates a standard XML metadata that is to be consumed by Maven, because Maven is faced with the same problem - determining the latest version; The metadata lists all available versions of an artifact and is generated for every artifact level folder; with a simple GET request and some XML parsing, you can discover the latest version.

这篇关于如何从Artifactory存储库下载最新的工件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆