Direct Upload using HTTP PUT to the Repository Path

Some repository formats such as Maven 2YUM, and RAW allow direct upload of assets using HTTP PUT. Formats such as NuGetNPM, 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>

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

the follow is that use rest api to upload the file to nexus3

https://help.sonatype.com/repomanager3/rest-and-integration-api/components-api?_ga=2.187141739.254614937.1604483825-1150653186.1592359043#ComponentsAPI-UploadComponent

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐