我正在构建继承父模块的maven项目。无法从发布回购下载依赖项工件
<parent>
<groupId>com.xxx.dist</groupId>
<artifactId>com.xxx.dist.core.msp.service.pom</artifactId>
<version>0.1-SNAPSHOT</version> <!-- 0.1 for release -->
</parent>
<artifactId>com.lgc.dist.core.msp.service.kafka</artifactId>
父com.xxx.dist.core.msp.service.pom
的伪影发表在两个快照库(版本0.1-SNAPSHOT)并释放储存库(0.1版本)。
mvn deploy
运行用于部署快照。父POM可以成功下载:
[INFO] Downloading: https://repo.openearth.community/artifactory/distarch-maven-snapshots/com/xxx/dist/com.xxx.dist.core.msp.service.pom/0.1-SNAPSHOT/maven-metadata.xml
[INFO] Downloaded: https://repo.openearth.community/artifactory/distarch-maven-snapshots/com/xxx/dist/com.xxx.dist.core.msp.service.pom/0.1-SNAPSHOT/maven-metadata.xml (599 B at 1.9 KB/sec)
[INFO] Downloading: https://repo.openearth.community/artifactory/distarch-maven-snapshots/com/xxx/dist/com.xxx.dist.core.msp.service.pom/0.1-SNAPSHOT/com.xxx.dist.core.msp.service.pom-0.1-20170726.184445-38.pom
[INFO] Downloaded: https://repo.openearth.community/artifactory/distarch-maven-snapshots/com/xxx/dist/com.xxx.dist.core.msp.service.pom/0.1-SNAPSHOT/com.xxx.dist.core.msp.service.pom-0.1-20170726.184445-38.pom (14 KB at 664.4 KB/sec)
对于发布版本与Maven发布插件不过,这似乎并不能够下载从发布回购父POM:
[INFO] Downloading: https://repo.openearth.community/artifactory/distarch-maven-snapshots/com/xxx/dist/com.xxx.dist.core.msp.service.pom/0.1/com.xxx.dist.core.msp.service.pom-0.1.pom
[INFO] Downloading: https://repo.openearth.community/artifactory/distarch-maven-staging/com/xxx/dist/com.xxx.dist.core.msp.service.pom/0.1/com.xxx.dist.core.msp.service.pom-0.1.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.xxx.dist:com.xxx.dist.core.msp.service.kafka:[unknown-version]: Could not transfer artifact com.xxx.dist:com.lgc.dist.core.msp.service.pom:pom:0.1 from/to snapshots (https://repo.openearth.community/artifactory/distarch-maven-snapshots): Failed to transfer file: https://repo.openearth.community/artifactory/distarch-maven-snapshots/com/xxx/dist/com.xxx.dist.core.msp.service.pom/0.1/com.xxx.dist.core.msp.service.pom-0.1.pom. Return code is: 409 , ReasonPhrase:Conflict. and 'parent.relativePath' points at wrong local POM @ line 4, column 10
它试图在maven的settings.xml
,distarch-maven-snapshots
和distarch-maven-staging
中定义的两个回购库中查找工件。该错误可能有点误导,因为它指的是不能从快照回购而不是发布。我以前见过这个,只是表示它不能从snapshots
或staging
转移。
的0.1 POM确实存在分期回购 如果我只是粘贴到浏览器的整个URL https://repo.openearth.community/artifactory/distarch-maven-staging/com/xxx/dist/com.xxx.dist.core.msp.service.pom/0.1/com.xxx.dist.core.msp.service.pom-0.1.pom
,我可以显示POM文件。 snapshots
和staging
repoes都在相同的Artifactory中设置。当快照回购工作时,我无法从发布回购中获取什么原因。