方案一:通过nexus UI界面上传
方案二:通过API接口上传
(1)、using HTTP POST to Components REST API
curl -X 'POST' -u admin:nexus@admin \
'http://192.168.59.129:8081/service/rest/v1/components?repository=devops' \
-H 'accept: application/json' \
-H 'Content-Type: multipart/form-data' \
-F 'raw.directory=/test' \
-F 'raw.asset1=@test.tar.gz;type=application/gzip' \
-F 'raw.asset1.filename=test.tar.gz'
(2)、using HTTP PUT to the Repository Path
curl -v -u admin:admin123 --upload-file target/springbootdemo-0.0.5-SNAPSHOT.jar http://192.168.163.141:32004/repository/mvnhosted/com/liumiaocn/springbootdemo/0.0.5-SNAPSHOT/springbootdemo-0.0.5-SNAPSHOT.jar1
网友评论