sonatype nexus api
来源:互联网 发布:明道软件电脑版下载 编辑:程序博客网 时间:2024/06/05 00:47
Get status
curl http://localhost:8081/nexus/service/local/status
should 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/repositories
Getting a list of all users, now with authenticating as admin user
curl -X GET -u admin:admin123 http://localhost:8081/nexus/service/local/users
result 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=testng
or better GAV search
curl -X GET -u admin:admin123 http://localhost:8081/nexus/service/local/lucene/search?g=org.testng&a=testng&v=6.7
get 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.10
get 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
- sonatype nexus api
- Sonatype Nexus
- Sonatype Nexus
- Sonatype Nexus
- Centos Install SonaType Nexus
- Sonatype Nexus高级配置
- Sonatype Nexus高级配置
- Sonatype Nexus高级配置
- 搭建maven + nexus(sonatype)
- Sonatype Nexus安装
- sonatype nexus 搭建maven服务器
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- Sonatype Nexus 搭建Maven 私服
- U盘安装CentOS时停在Reached target Basic System的解决方案
- 【操作系统】请求分页存储管理方式
- 60周年大庆解说词
- selenium+Python 上传文件
- sublime-3 install package control(gbk中文乱码)
- sonatype nexus api
- 关于数据类型的一些易错点
- kafka
- 分割格式化字符串的方法
- 毕业生自传----一次大胆的尝试,作别亚信
- LED背显
- regmap使用介绍
- 【STL】vector
- 判断非空或者清空