问题
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