1

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]

Community
  • 1
  • 1
octavian1001
  • 314
  • 2
  • 7

1 Answers1

4

libs-snapshot is a virtual repository which you cannot deploy artifacts to.
You should use the oss-snapshot-local repository instead:

<snapshotRepository>
    <id>jfrog-snapshots</id>
    <url>http://oss.jfrog.org/artifactory/oss-snapshot-local</url>
</snapshotRepository>

For more information see Deploying Maven and Gradle snapshots to OJO (oss.jfrog.org)

Dror Bereznitsky
  • 20,048
  • 3
  • 48
  • 57