Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli)

[INFO] BUILD FAILURE
[ERROR] Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project mavenhello: Execution default-cli of goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run failed: Plugin org.apache.tomcat.maven:tomcat7-maven-plugin:2.2 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.tomcat.maven:tomcat7-maven-plugin:jar:2.2 -> org.apache.tomcat.maven:tomcat7-war-runner:jar:2.2 -> commons-cli:commons-cli:jar:1.2: Failed to read artifact descriptor for commons-cli:commons-cli:jar:1.2: Failure to find org.apache.commons:commons-parent:pom:11 in http://maven.aliyun.com/nexus/content/groups/public was cached in the local repository, resolution will not be reattempted until the update interval of nexus-aliyun has elapsed or updates are forced -> [Help 1]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

我刚使用maven的时候也出现了上诉办法,具体原因是阿里云仓库中没有这些jar包,此博主提供了一个解决办法:木偶人的博客

问题虽然解决了,但是不方便的地方就出现了,都知道阿里云镜像目前是国内最快的,将之注释之后,导致我引用的jar包下载特别慢.

后来我发现原来,再次选项下


我使用的默认settings.xml,默认的里面只有tomcat6的服务器,没有tomcat7的服务器,接着往下看,下面来验证我的言论

进行tomcat7:run的命令时

所以只需要下面的步骤就行了;还是继续使用阿里云仓库,再使用的话就指向我们自定义的settings.xml啦


希望能帮助有同样问题的朋友!!!

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值