简体   繁体   English

如何使用 maven 从 nexus 检索快照的时间戳和内部版本号?

[英]How to retrieve snapshot's timestamp & build number from nexus using maven?

I want to get the latest snapshot version( with timestamp) of an artifact from Nexus3 using maven directly instead of using nexus3 API.我想直接使用 maven 而不是使用 nexus3 API 从 Nexus3 获取工件的最新快照版本(带时间戳)。

I know that Nexus3 REST API allows us to get this information directly using it is API or by parsing the metadata of the artifact.我知道 Nexus3 REST API 允许我们直接使用它是 API 或通过解析工件的元数据来获取这些信息。

But I do not want to use Nexus3 API cause it consumes my resources, neither to rely on parsing artifact metadata's on nexus3.但我不想使用 Nexus3 API,因为它消耗了我的资源,也不依赖于在 nexus3 上解析工件元数据。

So is there a way to get the latest snapshot direct URL, to download the artifact, or to get the snapshot timestamp using only maven commands ?那么有没有办法获取最新的快照直接 URL、下载工件或仅使用 Maven 命令获取快照时间戳

No.不。

There is no single download URL for the latest SNAPSHOT.没有最新 SNAPSHOT 的单一下载 URL。

Your comment already mentioned the ways to find out about it (REST API, maven dependency plugin, parsing metadata).您的评论已经提到了了解它的方法(REST API、maven 依赖插件、解析元数据)。

If your desperately need such a URL, you need to build release versions.如果您迫切需要这样的 URL,则需要构建发布版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM