我正在構建繼承父模塊的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中設置。當快照回購工作時,我無法從發佈回購中獲取什麼原因。