2017-07-28 3 views
1

Ich baue ein Maven-Projekt, das ein Eltern-Modul erbt.Kann Abhängigkeitsartefakt von Release-Repo nicht herunterladen

<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> 

Die Artefakte der Eltern com.xxx.dist.core.msp.service.pom wird sowohl Snapshot-Repository (Version 0.1-SNAPSHOT) und Release-Repository (Version 0.1) veröffentlicht.

mvn deploy wird zum Bereitstellen von Snapshot ausgeführt. Der pom Elternteil kann erfolgreich heruntergeladen werden:

[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) 

Für Release-Build mit Maven Release Plugin obwohl es nicht in der Lage sein scheint das übergeordnete pom von Release-Repo zum Download:

[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 

Es versucht, Suchen Sie nach dem Artefakt in beiden Repos, die in settings.xml von Maven, distarch-maven-snapshots und distarch-maven-staging definiert sind. Der Fehler ist möglicherweise ein wenig irreführend, weil er sich darauf bezieht, dass der Snapshot nicht aus dem Snapshot, sondern aus dem Release übertragen werden kann. Ich habe das schon einmal gesehen und es bedeutet nur, dass es weder von snapshots noch staging übertragen werden konnte.

Die 0,1 pom in Repo-Staging existiert artifactory Und wenn ich fügen Sie einfach die ganze 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 in einem Browser, könnte ich die pom-Datei anzuzeigen. Sowohl snapshots als auch staging Repoes werden im selben Artifactory eingerichtet. Was könnte der Grund sein, dass ich nicht aus Release-Repo ziehen kann, während Snapshot Repo funktioniert.

Antwort

0

Es scheint, dass das POM aus irgendeinem Grund falsch benannt ist:

com.lgc.dist.core.msp.service.pom-0.1.pom

Es genannt werden sollen:

com.lgc.dist.core.msp.service-0.1.pom

A s Sie können sehen, Sie haben ".pom-0.1.pom", die "-0.1.pom" sein sollte

Können Sie versuchen, das zu ändern und sehen, ob das funktioniert?

Verwandte Themen