对于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和RELEASEas 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更多推荐
发布评论