There is another question related to this, but the error code is different (409).
In the pom.xml file I added:
<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>
And the settings.xml file contains:
<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>
The release is (almost) published to BinTray, but when I try to deploy a snapshot it fails with the following error:
Could not transfer artifact GROUP_ID:ARTIFACT_ID:jar:0.4-20150716.145236-1 from/to jfrog-snapshots (http://oss.jfrog.org/artifactory/libs-snapshot): Failed to transfer file: http://oss.jfrog.org/artifactory/libs-snapshot/GROUP_ID/ARTIFACT_ID/0.4-SNAPSHOT/ARTIFACT_ID-0.4-20150716.145236-1.jar. Return code is: 405, ReasonPhrase: Method Not Allowed. -> [Help 1]