Maven从Nexus下载后无法找到工件

问题描述 投票:1回答:2

我们遇到了问题。我在jenkins上建立了工作,在建立一个项目时,它从nexus中获取了工件。但即使它下载了它们,也无法找到工件失败的工件。它只发生在我们手动导入到nexus的工件上。

任何提示?

 [INFO] Downloading: http://xxx/nexus/content/groups/public/com/oracle/aqapi          /12.1.0.2/aqapi-12.1.0.2.pom
 [WARNING] The POM for com.oracle:aqapi:jar:12.1.0.2 is missing, no dependency information available
 [INFO] Downloading: http://xxx/nexus/content/groups/public/com/ibm/com.ibm.mq/7.1/com.ibm.mq-7.1.pom
 [WARNING] The POM for com.ibm:com.ibm.mq:jar:7.1 is missing, no dependency information available
 [INFO] Downloading: http://xxx/nexus/content/groups/public/com/ibm/com.ibm.dhbcore/7.1/com.ibm.dhbcore-7.1.pom
 [WARNING] The POM for com.ibm:com.ibm.dhbcore:jar:7.1 is missing, no dependency information available
 [INFO] Downloading: http://xxx/nexus/content/groups/public/com/oracle/aqapi/12.1.0.2/aqapi-12.1.0.2.jar
 [INFO] Downloading: http://xxx/nexus/content/groups/public/com/ibm/com.ibm.mq/7.1/com.ibm.mq-7.1.jar
 [INFO] Downloading: http://xxx/nexus/content/groups/public/com/ibm/com.ibm.dhbcore/7.1/com.ibm.dhbcore-7.1.jar
 Started calculate disk usage of build
 Finished Calculation of disk usage of build in 0 seconds
 Started calculate disk usage of workspace
 Finished Calculation of disk usage of workspace in 0 seconds
 ....
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.091s
[INFO] Finished at: Fri Dec 22 14:09:58 CET 2017
[INFO] Final Memory: 16M/491M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project XXX: Could not resolve dependencies for project YYY:jar:2.14.11: The following artifacts could not be resolved: com.oracle:aqapi:jar:12.1.0.2, com.ibm:com.ibm.mq:jar:7.1, com.ibm:com.ibm.dhbcore:jar:7.1: Could not find artifact com.oracle:aqapi:jar:12.1.0.2 in nexus (http://xxx/nexus/content/groups/public) -> [Help 1]
[ERROR]`
java maven jenkins build nexus
2个回答
0
投票

我认为它还没有完全下载,你可以查看~/.m2/repository的依赖。因为它在实际情况下仅显示“下载”,它将显示下载消息。

  1. 首先检查n / w设置和互联网。
  2. 如果n / w不是问题,请删除~/.m2文件夹并再次重试

0
投票

你看到Nexus的依赖吗? nexus中的pom文件中的信息是否与您的pom相对应?

http://nexusUrl/nexus/content/repositories/central/checkstyle/checkstyle/4.1/checkstyle-4.1.pom

<?xml version="1.0"?>
<project>
                <modelVersion>4.0.0</modelVersion>
                <groupId>checkstyle</groupId>
                <artifactId>checkstyle</artifactId>
                <version>4.1</version>
                <dependencies>
                               ...
                </dependencies>
</project>

在你的pom:

<dependency>
                <groupId>checkstyle</groupId>
                <artifactId>checkstyle</artifactId>
                <version>4.1</version>
</dependency>

并检查您的设置以访问Nexus(settings.xml)。

© www.soinside.com 2019 - 2024. All rights reserved.