Maven artifact is not yet publish in BinTray

允我心安 提交于 2019-12-10 10:27:37

问题


I have a Maven project. I added in settings.xml file the configuration for the BinTray server:

<server>
    <id>bintray</id>
    <username>USERNAME</username>
    <password>API_KEY</password>
</server>

Then in the pom.xml I have added:

<distributionManagement>
    <repository>
        <id>bintray</id>
        <url>https://api.bintray.com/maven/USERNAME/maven/PACKAGE_NAME;publish=1</url>
    </repository>
</distributionManagement>

In the BinTray web interface I get the following message:

Notice: You have 16 unpublished item(s) for this package (expiring in 6 days and 22 hours) Discard | Publish

So this means that the artifacts (jar, pom, javadoc, sources, hashes) are not yet published.

So do I need every time when I make a release to go to BinTray web interface to publish the artifacts? Is there a setting to publish them automatically from Maven?


回答1:


You need a slightly different distributionManagement block so the matrix parameters are sent to bintray:

<distributionManagement>
    <repository>
        <id>bintray</id>
        <url>https://api.bintray.com/maven/USERNAME/maven/PACKAGE_NAME/;publish=1;</url>
    </repository>
</distributionManagement>


来源:https://stackoverflow.com/questions/31454299/maven-artifact-is-not-yet-publish-in-bintray

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