通过curl command上传jar文件到Nexus3 Maven repository
Direct Upload using HTTP PUT to the Repository PathSome repository formats such asMaven 2,YUM, andRAWallow direct upload of assets using HTTP PUT.Formats such asNuGet,NPM, andDockerDO NOT support thes
·
Direct Upload using HTTP PUT to the Repository Path
Some repository formats such as Maven 2, YUM, and RAW allow direct upload of assets using HTTP PUT. Formats such as NuGet, NPM, and Docker DO NOT support these type of simple HTTP PUT uploads.
You can do an HTTP PUT of local file to a repository path using the form /repository/<repo-id>/<path-of-file>.
A curl example:
curl -v -u admin:admin123 --upload-file pom.xml http://localhost:8081/repository/maven-releases/org/foo/1.0/foo-1.0.pom
- admin is the user name and admin123 is the password
- pom.xml is the local file being uploaded
- Nexus 3 UI is running at http://localhost:8081/
- the file is being uploaded into a repository with id maven-releases
- upon success, the uploaded file will downloadable from http://localhost:8081/repository/maven-releases/org/foo/1.0/foo-1.0.pom
the follow is that use rest api to upload the file to nexus3
更多推荐
已为社区贡献4条内容
所有评论(0)