maven 报错找不到Could not find artifact maven-plugins:maven-cobertura-plugin:plugin:1.3

Failed to execute goal on project : Could not resolve dependencies for project cs2c.nkscloudweb:nkscloudweb3:war:3.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: Could not find artifact maven-plugins:maven-cobertura-plugin:plugin:1.3 in nexus (http://10.1.81.221:8081/nexus/content/groups/public) -> [Help 1]

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project nkscloudweb3: Could not resolve dependencies for project cs2c.nkscloudweb:nkscloudweb3:war:3.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: Could not find artifact maven-plugins:maven-cobertura-plugin:plugin:1.3


一直报错这个,我查了,没有引用这两个依赖呀。

之后增加了 mvn compile -X -e 增加了DEBUG信息,可以查到:

[DEBUG]    dom4j:dom4j:jar:1.6.1:compile
[DEBUG]       xml-apis:xml-apis:jar:1.0.b2:compile
[DEBUG]    org.jdom:jdom:jar:1.1.2:compile
[DEBUG]       jaxen:jaxen:jar:1.1.3:compile
[DEBUG]          jdom:jdom:jar:1.0:compile
[DEBUG]          xerces:xercesImpl:jar:2.6.2:compile
[DEBUG]          xom:xom:jar:1.0:compile
[DEBUG]             xerces:xmlParserAPIs:jar:2.6.2:compile
[DEBUG]             xalan:xalan:jar:2.6.0:compile
[DEBUG]             com.ibm.icu:icu4j:jar:2.6.1:compile
[DEBUG]          maven-plugins:maven-cobertura-plugin:plugin:1.3:compile
[DEBUG]             cobertura:cobertura:jar:1.8:compile
[DEBUG]             oro:oro:jar:2.0.8:compile
[DEBUG]             commons-jelly:commons-jelly-tags-log:jar:1.0:compile
[DEBUG]          maven-plugins:maven-findbugs-plugin:plugin:1.3.1:compile
[DEBUG]             findbugs:bcel:jar:5.1:compile
[DEBUG]             findbugs:coreplugin:jar:1.0.0:compile
[DEBUG]             findbugs:findbugs:jar:1.0.0:compile
原来是dom4j引用的,修改修改它的版本就可以了吧,或者增加类似这样的说明:

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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

day walker

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值