如何使用 Sonatype REST Api 获取最高版本的构建(最新的临时构建)?
http://MY_REPOSITORY/nexus/service/local/lucene/search?a=ARTIFACT_NAME&v=ARTIFACT_VERSION
将构建版本作为 ARTIFACT_VERSION
有效。传递 v=LATEST
或 v=latest
不会返回最新版本。
最佳答案
没有记录/service/local/lucene/search 支持“最新”作为版本参数 [ link ]
OSS rest api 文档指出 /service/local/artifact/maven
[ link ](获取工件 pom 文件)和 /service/local/artifact/maven/content
[ link ](获取实际文件内容)确实支持它:
Version of the artifact (Required) Supports resolving of "LATEST", "RELEASE" and snapshot versions ("1.0-SNAPSHOT") too.
所以我认为您应该使用其中之一(您还必须为它们提供 repositoryId 和 groupId) 例如:
http://MY_REPOSITORY/nexus/service/local/artifact/maven/content?r=repoId&g=groupName&a=art&v=LATEST
关于rest - Sonatype Nexus REST Api 获取最新的构建版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14783859/