代码之家  ›  专栏  ›  技术社区  ›  Hari Ram

将工件包上载到sonatype

  •  0
  • Hari Ram  · 技术社区  · 7 年前

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

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

    我试过通过上面的curl命令,我也试过URL中的许多变体,但仍然得到了支持 404 - Repository with ID="com" not found .

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

    1 回复  |  直到 7 年前
        1
  •  0
  •   Hari Ram    7 年前

    这对我很有效。

    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_USER 是的用户名 https://oss.sonatype.org $SONATYPE_PASSWORD 是相同的密码。