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?
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>
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With