Maven 找不到 maven-plugins:maven-cobertura-plugin

发布于 2024-12-18 12:01:11 字数 902 浏览 5 评论 0原文

我尝试使用 编译 maven web 项目

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

问题是,当我尝试编译它时,出现以下错误:

[错误] 无法在项目 inferx-d2aserver 上执行目标:可以 不解决项目的依赖关系 com.inferx:inferx-d2aserver:war:4.0:以下工件无法 已解决:maven-plugins:maven-cobertura-plugin:plugin:1.3, maven-插件:maven-findbugs-插件:插件:1.3.1, org.springframework.ws:spring-ws:jar:3.0.5.RELEASE: 找不到 maven-插件:maven-cobertura-插件:插件:1.3 英寸 http://repository.springsource.com/maven/bundles/release 已缓存在 本地存储库,不会重新尝试解析,直到 com.springsource.repository.bundles.release 的更新间隔有 已过去或强制更新 -> [帮助1] [错误]

我使用 Apache Maven 3.0.3,Java:1.7.0 操作系统:Windows 7(64 位)

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

温馨耳语 2024-12-25 12:01:12

从与 cobertura 版本相关的错误消息来看,您可能遇到了对应于 maven 1pom.xml

以下是 Maven 1.x 版本的插件,不受支持。

  • maven-插件:maven-cobertura-插件:插件:1.3,
  • maven-插件:maven-findbugs-插件:插件:1.3.1

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
梦萦几度 2024-12-25 12:01:12

删除 pom 并不是解决方案;在未来的构建中,您可能需要它们。根据我的意见,最好的解决方案是修改相应 jar 的 POM 。就像如果你因为任何罐子而收到错误一样;实际上,它的 POM 中定义了依赖关系。因此,请使用。那肯定会起作用。

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.

流年里的时光 2024-12-25 12:01:12

这就是我排除失败插件的方法:

        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.3</version>
            <exclusions>
                <exclusion>
                    <groupId>maven-plugins</groupId>
                    <artifactId>maven-cobertura-plugin</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>maven-plugins</groupId>
                    <artifactId>maven-findbugs-plugin</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

This is how I excluded the failing plugins:

        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.3</version>
            <exclusions>
                <exclusion>
                    <groupId>maven-plugins</groupId>
                    <artifactId>maven-cobertura-plugin</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>maven-plugins</groupId>
                    <artifactId>maven-findbugs-plugin</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
酒废 2024-12-25 12:01:11

我不确定这是否是相同的情况,因为我的依赖项不同。我收到了具有相同依赖项错误的类似错误消息,因此我从 ~/.m2/repository/jaxen/jaxen/1.1.3/jaxen-1.1.3.pom 中删除了两个依赖项,并且项目已编译现在好了。

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.

携余温的黄昏 2024-12-25 12:01:11

我也面临类似的问题。我刚刚将 jaxen 从 Jdom 依赖中排除,它对我有用。

jdom 1.1.2 包括导入这些工件的 jaxen 1.1.3

      <dependency>
        <groupId>org.jdom</groupId>
        <artifactId>jdom</artifactId>
        <version>1.1.2</version>
        <exclusions>
            <exclusion>
               <groupId>jaxen</groupId>
               <artifactId>jaxen</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

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>
随梦而飞# 2024-12-25 12:01:11

看起来您的 pom 或父 pom 包含 maven-coberatura-plugin 应首先修复该问题。此外,删除本地存储库中的文件夹。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文