我在JCenter(oss.jfrog.org)中部署了一个artificact,尽管部署没有没有错误地结束(参见Deploy SNAPSHOT to oss.jfrog.org (JCenter)),当我检查Repository浏览器时,jar就在那里。
现在我在这个工件(库)的项目中添加依赖项并添加:
<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>
当maven开始构建时,它会抛出此错误:
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]
我添加的依赖项。这可能是什么问题?
答案 0 :(得分:3)
尝试使用虚拟存储库
<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>
答案 1 :(得分:1)
我有解决方法。不知道为什么,但在我的情况下,为所有模块添加阴影插件解决了问题,即使是空的:
/^(class-([12]{2})\/([^\/]+))\/?$/