artifact is not uploaded to Nexus repository via curl command

流过昼夜 提交于 2019-12-14 03:13:44

问题


Follow instruction on this page:

https://support.sonatype.com/entries/22189106-How-can-I-programatically-upload-an-artifact-into-Nexus-

I was able to upload artifact to repository Australia by using this command:

curl -v -u admin:admin123 --upload-file RE_0.0.0.19.tar.gz http://nexus1.ccorp.com/nexus/content/repositories/Australia/RE_0.0.0.19.tar.gz

That doesn't create POM file or has artifactId associate with, which mean I won't able to query for latest build in that repository.

I then tried this command:

curl -v -F r=releases -F hasPom=false -F e=tar.gz -F g=Australia -F a=RE -F v=0.0.0.19 -F p=tar.gz -F file=RE_0.0.0_19.tar.gz -u admin:admin123 http://nexus1.ccorp.com/nexus/service/local/artifact/maven/content

I got this log with no error, but artifact is not uploaded:

Hostname was NOT found in DNS cache Trying 10.10.5.92... Connected to nexus1.ccorp.com (10.10.5.92) port 80 (#0) Server auth using Basic with user 'admin' POST /nexus/service/local/artifact/maven/content HTTP/1.1 Authorization: Basic YWRtaW46YWRtaW4xMjM= User-Agent: curl/7.35.0 Host: nexus1.ccorp.com Accept: / Content-Length: 852 Expect: 100-continue Content-Type: multipart/form-data; boundary=------------------------929d6986ddb3024d

HTTP/1.1 100 Continue HTTP/1.1 201 Created Date: Tue, 20 Oct 2015 20:29:11 GMT Server Nexus/2.11.4-01 Noelios-Restlet-Engine/1.1.6-SONATYPE-5348-V8 is not blacklisted Server: Nexus/2.11.4-01 Noelios-Restlet-Engine/1.1.6-SONATYPE-5348-V8 X-Frame-Options: SAMEORIGIN X-Content-Type-Options: nosniff Content-Type: text/html;charset=UTF-8 Content-Length: 85

Connection #0 to host nexus1.ccorp.com left intact {"groupId":"Australia","artifactId":"RE","version":"0.0.0.19","packaging":"tar.gz"}

来源:https://stackoverflow.com/questions/33246797/artifact-is-not-uploaded-to-nexus-repository-via-curl-command

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!