Maven failure to find maven-plugins:maven-cobertur

2019-01-25 10:11发布

I try to compile maven web project with

<dependency>
    <groupId>org.springframework.ws</groupId>
    <artifactId>spring-ws</artifactId>
    <version>3.0.5-FINAL</version>
</dependency>

The problem is that when I try compile it I get the following errors:

[ERROR] Failed to execute goal on project inferx-d2aserver: Could not resolve dependencies for project com.inferx:inferx-d2aserver:war:4.0: The following artifacts could not be resolved: maven-plugins:maven-cobertura-plugin:plugin:1.3, maven-plugins:maven-findbugs-plugin:plugin:1.3.1, org.springframework.ws:spring-ws:jar:3.0.5.RELEASE: Failure to find maven-plugins:maven-cobertura-plugin:plugin:1.3 in http://repository.springsource.com/maven/bundles/release was cached in the local repository, resolution will not be reattempted until the update interval of com.springsource.repository.bundles.release has elapsed or updates are forced -> [Help 1] [ERROR]

I use Apache Maven 3.0.3, Java: 1.7.0 OS: Windows 7 (64 bit)

5条回答
我命由我不由天
2楼-- · 2019-01-25 10:48

From the error message related to cobertura version, it looks like you may be having a pom.xml corresponding to maven 1.

The following are maven 1.x versions of the plugins and not supported.

  • maven-plugins:maven-cobertura-plugin:plugin:1.3,
  • maven-plugins:maven-findbugs-plugin:plugin:1.3.1
查看更多
何必那么认真
3楼-- · 2019-01-25 10:51

I am not sure if this is the same case since my dependencies is different. I got similar error message with the same dependencies error so I removed both dependencies from ~/.m2/repository/jaxen/jaxen/1.1.3/jaxen-1.1.3.pom and the project is compile fine now.

查看更多
混吃等死
4楼-- · 2019-01-25 10:57

Removing the pom is not the solution; in future builds may be you need them. Best solution according to my opinion is to modify the POM of corresponding jars. Like if you are getting error because of any jar; actually there is the dependency defined in its POM. So use <exclude>. That will work for sure.

查看更多
趁早两清
5楼-- · 2019-01-25 10:59

I was also facing similar issue. I just excluded jaxen from Jdom dependency and it worked for me.

jdom 1.1.2 includes jaxen 1.1.3 which imports those artifacts.

      <dependency>
        <groupId>org.jdom</groupId>
        <artifactId>jdom</artifactId>
        <version>1.1.2</version>
        <exclusions>
            <exclusion>
               <groupId>jaxen</groupId>
               <artifactId>jaxen</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
查看更多
成全新的幸福
6楼-- · 2019-01-25 11:03

It look like your pom or parent pom contains a wrong definition of the maven-coberatura-plugin which should be fixed first. Furthermore remove the folder in your local repository.

查看更多
登录 后发表回答