还有另一个question与此相关,但错误代码不同(409)。
在pom.xml文件中我添加了:
<distributionManagement>
<!-- Release repository -->
<repository>
<id>bintray</id>
<url>https://api.bintray.com/maven/USERNAME/maven/PACKAGE_NAME;publish=1</url>
</repository>
<!-- Snapshot repository -->
<snapshotRepository>
<id>jfrog-snapshots</id>
<url>http://oss.jfrog.org/artifactory/libs-snapshot</url>
</snapshotRepository>
</distributionManagement>
settings.xml文件包含:
<servers>
<server>
<id>bintray</id>
<username>USERNAME</username>
<password>API_KEY</password>
</server>
<server>
<id>jfrog-snapshots</id>
<username>USERNAME</username>
<password>API_KEY</password>
</server>
</servers>
该版本是(almost)发布到BinTray,但是当我尝试部署快照时,它失败并出现以下错误:
无法传输工件 GROUP_ID:ARTIFACT_ID:jar:0.4-20150716.145236-1 from / to jfrog-snapshots (http://oss.jfrog.org/artifactory/libs-snapshot):无法转移 文件: http://oss.jfrog.org/artifactory/libs-snapshot/GROUP_ID/ARTIFACT_ID/0.4-SNAPSHOT/ARTIFACT_ID-0.4-20150716.145236-1.jar。 返回代码为: 405 ,ReasonPhrase:方法不允许。 - &GT; [帮助1]
答案 0 :(得分:4)
libs-snapshot
是virtual repository,您无法将工件部署到。{
您应该使用oss-snapshot-local
存储库:
<snapshotRepository>
<id>jfrog-snapshots</id>
<url>http://oss.jfrog.org/artifactory/oss-snapshot-local</url>
</snapshotRepository>
有关详细信息,请参阅Deploying Maven and Gradle snapshots to OJO (oss.jfrog.org)