将工件包上传到sonatype

时间:2017-11-22 13:42:07

标签: maven curl nexus sonatype

我想通过curl命令将工件包(jar)上传到https://oss.sonatype.org。我正面临网址问题。

curl -v -u 'username':'password' --upload-file xyz-version-bundle.jar https://oss.sonatype.org/content/repositories/com/abc/xyz/version/

我已尝试通过上面的curl命令,我在网址上尝试了很多变化,但仍然获得了404 - Repository with ID="com" not found

注意:bundle jar文件包含所有文件,如pom等。我可以通过UI上传相同的包。

1 个答案:

答案 0 :(得分:0)

这对我有用。

curl -ujorlina2 -u $SONATYPE_USER:$SONATYPE_PASSWORD --request POST -F "file=@xyz-"$VERSION"-bundle.jar" "https://oss.sonatype.org/service/local/staging/bundle_upload"

此处SONATYPE_USERhttps://oss.sonatype.org的用户名,$SONATYPE_PASSWORD是相同的密码。

相关问题