Я довольно новичок в maven, поэтому не знаю, как исправить эту проблему.Maven не может разрешить зависимость для проекта из исходного местоположения
Я пытаюсь упаковать мой Maven проект (mvn clean package
), но я получаю эту ошибку:
Failed to execute goal on project TestSDK: Could not resolve dependencies for project com.company.idea.qe:qeTestSDK:jar:1.0-SNAPSHOT: Failure to find org.slf4j:slf4j-parent:jar:1.7.21 in http://nexus-proxy/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of Company-nexus has elapsed or updates are forced -> [Help 1]
Я считаю, что это вызвано Maven, используя значение хранилища в качестве единственного источника загрузки зависимостей. Я требую, чтобы он загрузил артефакт WebDriverBuilder
. Быть новым для Maven
Я не уверен, как это сделать.
мой pom.xml в настоящее время выглядит следующим образом:
http://maven.apache.org/xsd/maven-4.0.0.xsd "> 4.0.0
<groupId>com.company.idea.qe</groupId>
<artifactId>qeTestSDK</artifactId>
<version>1.0-SNAPSHOT</version>
<repositories>
<repository>
<id>company-nexus</id>
<name>Compnay Nexus</name>
<url>http://nexus-proxy/nexus/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.company.tools</groupId>
<artifactId>WebDriverBuilder</artifactId>
<version>2.3.3</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.10</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.0</version>
</dependency>
<!-- Gson: Java to Json conversion -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.6.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-parent</artifactId>
<version>1.7.21</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
</plugins>
</build>
Попробуйте запустить «mvn clean package -U» – Shailendra
@Shailendra получил ту же ошибку =/ – Liondancer
Аргумент «slf4j-parent» должен иметь тип «pom», но ошибка предполагает, что он пытается загрузить артефакт jar, который должен потерпеть неудачу. – Shailendra