问题描述
我有一个Maven项目.我在 settings.xml 文件中添加了BinTray服务器的配置:
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>
然后在 pom.xml 中添加:
<distributionManagement>
<repository>
<id>bintray</id>
<url>https://api.bintray.com/maven/USERNAME/maven/PACKAGE_NAME;publish=1</url>
</repository>
</distributionManagement>
在BinTray Web界面中,我收到以下消息:
In the BinTray web interface I get the following message:
注意:此包装中有16个未发布的商品(将于6天22小时后过期).发布
因此,这意味着工件(jar,pom,javadoc,源代码,哈希值)尚未发布.
So this means that the artifacts (jar, pom, javadoc, sources, hashes) are not yet published.
那么,每次发布时我都需要进入BinTray Web界面来发布工件吗?是否可以通过Maven自动发布它们?
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?
推荐答案
您需要一个稍微不同的distributionManagement
块,以便将矩阵参数发送到Bintray:
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>
这篇关于Maven工件尚未在BinTray中发布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!