Maven-Projekt kann nicht lokalisieren von Abhängigkeiten im lokalen repository
Ich habe ein maven-Projekt-setup.
In mein maven-POM-Datei, es ist wie folgt definiert:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.myProject</groupId>
<artifactId>basePOM</artifactId>
<version>1.0</version>
<relativePath>../../../shared/common/pom.xml</relativePath>
</parent>
<groupId>com.myProject.services</groupId>
<artifactId>orderservice</artifactId>
<version>developer</version>
<packaging>war</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.3</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!--Internal dependencies-->
<dependency>
<groupId>com.myProject.shared</groupId>
<artifactId>model</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-spring</artifactId>
</dependency>
</dependencies>
</project>
Ich habe ein parent-POM definiert einige Allgemeine bits:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<name>Base POM</name>
<groupId>com.myProject</groupId>
<artifactId>basePOM</artifactId>
<version>1.0</version>
<packaging>pom</packaging>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.myProject.shared</groupId>
<artifactId>model</artifactId>
<version>developer</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId>
<version>1.2.GA</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-spring</artifactId>
<version>1.2.GA</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
Wenn ich
mvn clean install
Des resteasy-jaxrs und resteasy-Frühling heruntergeladen auf mein lokales repository ohne problem.
Jedoch, es dann einen Fehler produziert, sagte:
**[ERROR] Failed to execute goal on project orderservice: Could not resolve dependencies for
project com.mxyy.services:orderservice:war:developer: Failed to collect dependencies for
[com.mxyy.shared:model:jar:developer (compile), org.jboss.resteasy:resteasy-jaxrs:jar:1.2.
GA (compile), org.jboss.resteasy:resteasy-spring:jar:1.2.GA (compile), org.testng:testng:j
ar:jdk15:5.8 (test)]: Failed to read artifact descriptor for com.mxyy.shared:model:jar:dev
eloper: Failure to find com.mxyy:basePOM:pom:1.0 in http://repo.maven.apache.org/maven2 wa
s cached in the local repository, resolution will not be reattempted until the update inte
rval of central has elapsed or updates are forced -> [Help 1]**
Aussieht wie das Projekt nicht Abholung die Abhängigkeiten bereits in meinem lokalen repository.
Kann jemand lassen Sie mich wissen, wie kann ich dieses problem lösen?
Vielen Dank
Mehr Info:
Habe ich vorübergehend entfernt, die Abhängigkeit com.myProject.geteilt wird. Jetzt wird die Fehlermeldung angezeigt wird:
[ERROR] Failed to execute goal on project orderservice: Could not resolve dependencies for project com.mxyy.services:orderservice:war:developer: Faile
d to collect dependencies for [org.jboss.resteasy:resteasy-jaxrs:jar:1.2.GA (compile), org.jboss.resteasy:resteasy-spring:jar:1.2.GA (compile)]: Faile
d to read artifact descriptor for org.scannotation:scannotation:jar:1.0.2: Could not transfer artifact org.scannotation:scannotation:pom:1.0.2 from/to
jboss (http://repository.jboss.org/maven2): Access denied to: http://repository.jboss.org/maven2/org/scannotation/scannotation/1.0.2/scannotation-1.0
.2.pom, ReasonPhrase:Forbidden. -> [Help 1]
InformationsquelleAutor Kevin | 2012-02-19
Du musst angemeldet sein, um einen Kommentar abzugeben.
Gut, sieht aus wie der Zugang verboten ist.
Müssen Sie die Recht Pfad zum JBoss-repository: https://repository.jboss.org/nexus/content/groups/public-jboss/
Hier ist das Artefakt, die Sie benötigen:
https://repository.jboss.org/nexus/content/groups/public-jboss/org/scannotation/scannotation/
So, erwähnen Sie in Ihrer POM:
in repositories Liste
InformationsquelleAutor weekens
mvn clean install
Ihremodel
Projekt ersten. Installiert wird der Artefakte in Ihrem lokalen repo, wo sich Ihre Zielgruppe aufzubauen, kann Sie finden.Edit:
Wenn das immer noch nicht hilft, verwenden Sie die
-X
switch anzeigen weitere Fehler/debug-Informationen:Siehe Antwort bearbeitet
InformationsquelleAutor Bohemian
Einfach nur anschaut, Ihre Fehler-Ausgang (und ich nehme an, Sie wusste nicht, geben Sie es manuell ein), es scheint, Sie haben einen Schreibfehler bei der Gruppen-id von myProject zu mxProject.
oh, ich sehe 🙂 sind die pom Dateien für heruntergeladene/gebaut depedencies richtig?
Ich habe beide POMs verwendet in meinem Projekt. Ich habe ein parent-POM mit einigen gängigen bits. Bitte sehen Sie sich die ursprüngliche Frage.
InformationsquelleAutor jmluy
überprüfen Abhängigkeit Erklärung (artifactId und groupId), kann es nur ein Tippfehler 😉
InformationsquelleAutor jediz