如何将JAR上传到Nexus OSS 3? [英] how to upload JAR to Nexus OSS 3?
本文介绍了如何将JAR上传到Nexus OSS 3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何通过curl
Nexus 3执行jar的上传?
我尝试使用
How to perform an upload of a jar via curl
the Nexus 3?
I tried using the link tips but without success.
这是我的尝试:
curl -v -F r = -F releases hasPom = true and = -F jar -F file = @. / v12.1.0.1 / pom.xml -F file = @. / v12.1.0.1 / ojdbc7.jar -u admin: admin123 http: // localhost: 8081 / repository / maven releases
curl -v -F r = -F releases hasPom = false -F and -F jar = g = com.oracle.jdbc -F = ojdbc7 -F v = 1.0 p = -F jar -F file = @. / v12 .1.0.1 / ojdbc7.jar -u admin: admin123 http: // localhost: 8081 / repository / maven releases
两个都有400个错误的请求.
Both have 400 Bad Request.
推荐答案
我已如下修改您的代码.请尝试这个.
I've modified your code as below. Please try this.
curl -v -F r=releases -F hasPom=false -F e=jar -F g=com.oracle.jdbc -F a=ojdbc7 -F v=1.0 -F p=jar -F file=@"./v12.1.0.1/ojdbc7.jar" -u admin:admin123 http://localhost:8081/nexus/service/local/artifact/maven/content
我也建议使用完整路径而不是相对路径.您可以分享使用此卷曲代码片段的位置吗?像Jenkins这样的CI工具吗?
Also I would suggest using the full path rather than relative path. Can you share where you are using this curl snippet? Any CI tool like Jenkins?
这篇关于如何将JAR上传到Nexus OSS 3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文