如何提供对Nexus 2.x中工件的最新快照的URL访问? [英] How do I provide URL access to the latest snapshot of an artifact in Nexus 2.x?

查看:65
本文介绍了如何提供对Nexus 2.x中工件的最新快照的URL访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想提供一个简单的URL,该URL将始终返回工件快照版本的最新版本.简单来说,我的意思是URL不会更改,或者要求用户浏览目录并检查时间戳.

I would like to provide a simple URL that will always return the latest version of a snapshot version of an artifact. By simple I mean that the URL doesn't change, or require the user to browse the directory and examine timestamps.

推荐答案

请注意

  • 此答案与Nexus 2.X
  • 有关
  • 使用restlet API下载大型工件会对性能产生明显影响,请参见:
  • this answer relates to Nexus 2.X
  • There is a noticeable performance impact of using the restlet API to download large artifacts, see: https://community.sonatype.com/t/slow-artefacts-download-performance-with-oss-2-x/2280

核心Nexus重定向" REST API 可用于从指定的存储库中检索工件的任何版本:

The core Nexus "redirect" REST API can be used to retrieve any version of an artifact from a nominated repository:

例如:

v 参数可以是类似1.0-SNAPSHOT的值,在这种情况下,Maven将返回存储库中保存的最新的带时间戳的快照.类似地,如果没有更新的发行版本,则特殊值"LATEST"应该执行相同的操作.

The v parameter can be a value like 1.0-SNAPSHOT, in which case Maven will return the latest time-stamped snapshot held in the repository. Similiarily the special value "LATEST" should do the same provided a more recent released version is not present.

这篇关于如何提供对Nexus 2.x中工件的最新快照的URL访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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