1

我正在尝试将 Atlassian Clover 插件集成到我现有的 Maven 3 项目中。我也在使用 Nexus 2.6.3。例如

mvn clover2:setup test clover2:aggregate clover2:clover

产生错误:

[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-clover2-plugin:3.2.0:instrumentInternal (default-cli) on project hpcmom: Execution default-cli of goal com.atlassian.maven.plugins:maven-clover2-plugin:3.2.0:instrumentInternal failed: Plugin com.atlassian.maven.plugins:maven-clover2-plugin:3.2.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: org.apache.ant:ant:jar:1.8.4, com.cenqua.clover:clover:jar:3.2.0: Could not find artifact org.apache.ant:ant:jar:1.8.4 in nexus (http://olympus:8081/nexus/content/groups/public) -> [Help 1]

这不是真的,我可以在 Central 中正确地查看和下载据称丢失的工件org.apache.ant:ant:jar:1.8.4,甚至从远程存储库选项卡视图中我也可以找到所需的工件。

我的构建还导致以下错误:

Downloading: http://olympus:8081/nexus/content/groups/public/org/codehaus/plexus/plexus-compiler-api/2.2/plexus-compiler-api-2.2.pom
[WARNING] The POM for org.codehaus.plexus:plexus-compiler-api:jar:2.2 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/org/apache/ant/ant/1.8.4/ant-1.8.4.pom
[WARNING] The POM for org.apache.ant:ant:jar:1.8.4 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/org/apache/ant/ant-launcher/1.8.4/ant-launcher-1.8.4.pom
[WARNING] The POM for org.apache.ant:ant-launcher:jar:1.8.4 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/org/apache/maven/reporting/maven-reporting-impl/2.0.5/maven-reporting-impl-2.0.5.pom
[WARNING] The POM for org.apache.maven.reporting:maven-reporting-impl:jar:2.0.5 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/com/cenqua/clover/clover/3.2.0/clover-3.2.0.pom
[WARNING] The POM for com.cenqua.clover:clover:jar:3.2.0 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/com/intellij/annotations/9.0.4/annotations-9.0.4.pom
[WARNING] The POM for com.intellij:annotations:jar:9.0.4 is missing, no dependency information available
Downloading: http://olympus:8081/nexus/content/groups/public/org/apache/ant/ant/1.8.4/ant-1.8.4.jar
Downloading: http://olympus:8081/nexus/content/groups/public/com/cenqua/clover/clover/3.2.0/clover-3.2.0.jar
4

1 回答 1

1

确保中央存储库是您的公共组的一部分。检查配置并可能通过从 Nexus 中浏览远程存储库进行检查,以确保没有网络问题阻止 Nexus 连接到中央存储库以下载这些 jar。

一旦您确认强制更新,因为 Maven 可能已经缓存了在您的本地存储库中未找到组件的事实。采用

mvn -U clover2:setup test clover2:aggregate clover2:clover
于 2013-10-26T17:08:37.543 回答