Sonatype Nexus 3 - 获取最新快照 [英] Sonatype Nexus 3 - get latest snapshot
问题描述
我们刚刚将nexus安装升级到最新版本(3.x)。有没有办法获得给定快照工件的最新版本? Nexus 2有一个不错的API,不再支持。
We've just upgraded out nexus installation to the latest release (3.x). Is there any way to get the latest version of a given snapshot artifact? Nexus 2 had a nice API which is not supported anymore.
同样的问题(但旧版本)已在这里得到解答:
Sonatype Nexus REST Api获取最新版本
Same question (but for the old version) has been answered here: Sonatype Nexus REST Api fetch latest build version
任何想法都受到高度赞赏。
Any ideas are highly appreciated.
最好,
Daniel
Best, Daniel
推荐答案
Nexus 2有一个不错的API,不再支持。
Nexus 2 had a nice API which is not supported anymore.
听起来你指的是:
/service/local/artifact/maven/content
/service/local/artifact/maven/redirect
如果您要求找到最新的xyz-SNAPSHOT版本,其中x,y ,z猜对了--Nexus从来没有这个功能(它只适用于插件)。
If you're asking to find the latest x.y.z-SNAPSHOT version where the x, y, z are guessed - Nexus never had this functionality (it worked only for plugins).
这简直是不真实的 - 请看以下文章这清楚地表明你可以指定LATEST,RELE ASE或SNAPSHOT基本版本。
This is simply untrue - see the following article which shows clearly you can specify LATEST, RELEASE or SNAPSHOT base versions.
https://support.sonatype.com/hc/en-us/articles/ 213465488 - 我如何检索快照 - 如果我不知道确切的文件名 -
这是可能的,但不是1-liner。
It's possible but not in a 1-liner.
是的 - 除非你有一个方便的工具,如< a href =https://github.com/sonatype/artifact-resolver =nofollow noreferrer> artifact-resolver ,它使用一行命令来获取工件。
Yes - unless you have a tool handy such as artifact-resolver which does uses a one line command to fetch an artifact.
这篇关于Sonatype Nexus 3 - 获取最新快照的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!