sonatype nexus api
2016-12-19 17:45
197 查看
Get status
curl http://localhost:8081/nexus/service/local/statusshould display something like
Sonatype Nexus Professional
Sonatype Nexus™ Professional Edition, Version: 2.1.2
2.1.2
2.1.2
Professional
PRO
…
List of repositories
curl http://localhost:8081/nexus/service/local/repositoriesGetting a list of all users, now with authenticating as admin user
curl -X GET -u admin:admin123 http://localhost:8081/nexus/service/local/usersresult e.g.
http://localhost:8081/nexus/service/local/users/anonymous
anonymous
…
Search for an artifact (keyword search)
use http://localhost:8081/nexus/nexus-indexer-lucene-plugin/default/docs/rest.lucene.search.html
curl -X GET -u admin:admin123 http://localhost:8081/nexus/service/local/lucene/search?q=testngor better GAV search
curl -X GET -u admin:admin123 http://localhost:8081/nexus/service/local/lucene/search?g=org.testng&a=testng&v=6.7get pom
documentation at http://localhost:8081/nexus/nexus-core-documentation-plugin/core/docs/rest.artifact.maven.html
curl -X GET -u admin:admin123 http://localhost:8081/nexus/service/local/artifact/maven?r=central&g=junit&a=junit&v=4.10get artifact
documentation at http://localhost:8081/nexus/nexus-core-documentation-plugin/core/docs/rest.artifact.maven.content.html
curl -X GET -u admin:admin123 “http://localhost:8081/nexus/service/local/artifact/maven/content?g=org.testng&a=testng&v=LATEST&r=central”resolve details about latest version of testng
curl -X GET -u admin:admin123 “http://localhost:8081/nexus/service/local/artifact/maven/resolve?r=central&g=org.testng&a=testng&v=LATEST”above snippet in a shell script extracting the version could look like this:
VERSION=curl -X GET -u admin:admin123 "http://localhost:8081/nexus/service/local/artifact/maven/resolve?r=central&g=org.testng&a=testng&v=LATEST" | sed -n 's|<version>\(.*\)</version>|\1|p'
echo “Version is $VERSION”
result should be 6.7 at the moment
And heck out the blog post http://www.sonatype.com/people/2012/07/learning-the-nexus-rest-api-read-the-docs-or-fire-up-a-browser/ about how to use the browser debug tools to monitor rest api calls of the nexus user interface itself
Contact GitHub API Training Shop Blog About相关文章推荐
- maven的pom文件 Project build error: Unresolveable build extension: Plugin org.sonatype.plugins:nexus-st
- Sonatype Nexus中Central Repositiories 的配置
- Sonatype Nexus 搭建maven私服
- sonatype nexus 3搭建Maven私服
- CentOS 安装 SonaType Nexus Maven Repository以及旧库迁移
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- SONATYPE NEXUS 搭建MAVEN 私服
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- 使用 Gradle 和 Sonatype Nexus 搭建自己的 Maven 仓库
- sonatype nexus 3搭建Docker私有仓库
- 团队建设-Maven 仓库 Sonatype Nexus 的搭建
- Maven Sonatype Nexus return 401
- sonatype nexus安装教程
- sonatype nexus 的安装
- Sonatype Nexus 搭建Maven 私服