我们使用nexus 3.0
我将文件上传到curl
到RAW存储库,例如文档:
https://books.sonatype.com/nexus-book/3.0/reference/raw.html#_uploading_files_files_to_to_hosted_raw_repositories
我尝试查询:
curl -u login:pw https://mynexus/myrepo
curl -u login:pw https://mynexus/myrepo/
但仅接收错误的HTML
如何使用curl
查询所有上传的文件?
curl 'http://localhost:8081/nexus/service/extdirect' -H 'Content-Type: application/json' -H 'Accept: */*' --data-binary '{"action":"coreui_Component","method":"readAssets","data":[{"page":1,"start":0,"limit":300,"sort":[{"property":"name","direction":"ASC"}],"filter":[{"property":"repositoryName","value":"repo_raw"}]}],"type":"rpc","tid":15}' --compressed
类似这样的东西
您可以使用nexus REST
api:
例如:
curl -u admin:admin123 -X GET 'http://localhost:8081/service/rest/v1/search?repository=maven-central&group=org.osgi'