문제

I'm trying to integrate the Atlassian Clover plugin to work with my existing Maven 3 project. I'm also using Nexus 2.6.3. e.g.

mvn clover2:setup test clover2:aggregate clover2:clover

produces the error:

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

And this is not true, I can see and download manually the supposedly missing artifacts org.apache.ant:ant:jar:1.8.4 correctly in Central and even from the Remote repository tab view I can also find the needed artifacts.

My build also results in the following errors:

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
도움이 되었습니까?

해결책

Make sure the Central repository is part of your public group. Check out the configuration and potentially check by browsing the remote repo from within Nexus to make sure no network issue prevents Nexus from connecting to the Central repo to download these jars.

Once you have confirmed force an update since Maven might have cached the fact that components were not found in your local repo. Use

mvn -U clover2:setup test clover2:aggregate clover2:clover
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top