Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be..

控制台:

Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.pluginsmaven-install-plugin:2.4: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to nexus (http://localhost:8080/nexus-2.7.0-06/content/groups/public/): Connect to localhost:8080 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect -> [Help 1]

解决办法:

第一步:打开maven根目录里的conf,settings.xml,在对应位置添加下面的代码:

  

     <mirror>   
            <id>Central</id>   
            <url>http://repo1.maven.org/maven2</url>   
            <mirrorOf>central</mirrorOf>   
        </mirror>  

第二步:删除本地仓库中org.apache.maven.plugins下的所有内容。

第三步:进行maven install:

可以看到控制台安装成功:


maven聚合工程必须在父工程Install以后再创建子工程,否则会创建失败。

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 5
    评论
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值