Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Return code is: 409, ReasonPhrase:Conflict (JCenter)

I have a artificact deployed in JCenter (oss.jfrog.org) although the deployment did not end without error (see Deploy SNAPSHOT to oss.jfrog.org (JCenter)), the jars are there when I check the Repository browser.

Now I add the dependency in a project for this artifact (library) and adding:

<repositories>
    <!-- Release repository -->
    <repository>
        <id>oss-jfrog-artifactory-releases</id>
        <name>oss-jfrog-artifactory-releases</name>
        <url>http://oss.jfrog.org/artifactory/oss-release-local</url>
    </repository>
    <!-- Snapshot repository -->
    <repository>
        <id>oss-jfrog-artifactory-snapshots</id>
        <name>oss-jfrog-artifactory-snapshots</name>
        <url>http://oss.jfrog.org/artifactory/oss-snapshot-local</url>
    </repository>
</repositories>

When maven started building, it throws this error:

Failed to transfer file: http://oss.jf rog.org/artifactory/oss-release-local/com/myorg/mylibrary/0.0.1-SNAPSHOT/mylibrary-0.0.1-SNAPSHOT.pom. Return code is: 409, ReasonPhrase:Conflict. -> [Help 1]

for the dependency I added. What could be the problem here?

like image 940
quarks Avatar asked Dec 11 '14 05:12

quarks


2 Answers

Try using the virtual repositories

 <repositories>
    <!-- Release repository -->
    <repository>
        <id>oss-jfrog-artifactory-releases</id>
        <name>oss-jfrog-artifactory-releases</name>
        <url>http://oss.jfrog.org/artifactory/libs-release</url>
    </repository>
    <!-- Snapshot repository -->
    <repository>
        <id>oss-jfrog-artifactory-snapshots</id>
        <name>oss-jfrog-artifactory-snapshots</name>
        <url>http://oss.jfrog.org/artifactory/libs-snapshot</url>
    </repository>
</repositories>
like image 132
richard Avatar answered Oct 11 '22 08:10

richard


I have a workaround. No idea why, but in my case adding shade plugin to all modules solved the problem, even an empty one:

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <configuration>
                <artifactSet>
                </artifactSet>
                <relocations>
                </relocations>
            </configuration>
        </plugin>
    </plugins>
</build>
like image 20
Paweł Prażak Avatar answered Oct 11 '22 07:10

Paweł Prażak