获取最新版本的工件的版本号(!)(Getting the version number (!) of the most recent release of an artifact)

编程入门 行业动态 更新时间:2024-10-27 20:37:22
获取最新版本的工件的版本号(!)(Getting the version number (!) of the most recent release of an artifact)

对于hubot脚本,我需要确定工件的最新发布版本。 所有工件都部署到一个sonatype nexus,所以我想使用nexus api来做到这一点。

有没有办法让nexus api只返回版本号?

for a hubot script i need to determine the most recent release version of an artifact. All artifacts are deployed to a sonatype nexus, so i want to use the nexus api to do that.

Is there a way to get the nexus api to return just the version number?

最满意答案

如此处所述,我可以使用“resolve”函数返回有关我可能想要的工件的所有信息

例如:

https://oss.sonatype.org/service/local/artifact/maven/resolve?r=cometd-snapshots&g=org.cometd.jetty&a=cometd-jetty-client&v=1.0-SNAPSHOT&e=jar

注意:

类型(e)是可选的,默认值是jar 可以获得json结果,但是如果出现错误或不存在的工件,结果总是html 支持版本LATEST和RELEASE

as described here i can use the "resolve" function that returns all information about an artifact i could ever want

For Example:

https://oss.sonatype.org/service/local/artifact/maven/resolve?r=cometd-snapshots&g=org.cometd.jetty&a=cometd-jetty-client&v=1.0-SNAPSHOT&e=jar

Note:

the type (e) is optional, the default value is jar it is possible to get a json result, but in case of errors or non existing artifacts the result is ALWAYS html the versions LATEST and RELEASE are supported

更多推荐

本文发布于:2023-08-04 00:29:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1405220.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工件   最新版本   版本号   version   release

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!