MyEclipse maven install 时Unable to load the mojo 'war' in the plugin解决方法

MyEclipse maven install 时Unable to load the mojo 'war' in the plugin解决办法
今天在工作中遇到一个很郁闷的问题,用myeclipse的maven插件mvn install的时候老是失败,报错如下:
[INFO] ------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------
[INFO] Total time: 1.134s
[INFO] Finished at: Wed Mar 14 15:39:12 CST 2012
[INFO] Final Memory: 3M/6M
[INFO] ------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war (default-war) on project aipisoft_search_web: Execution default-war of goal org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1:war failed: Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.1-alpha-1'. A required class is missing: org/codehaus/plexus/archiver/jar/JarArchiver
后来发现是maven指定版本问题,在pom.xml中添加如下内容解决问题:
  <plugin>
    <groupId>org.apache.maven.plugins</groupId$amp;>amp;$nbsp;  
      <artifactId>maven-war-plugin</artifactId$amp;>amp;$nbsp;  
      <version>2.1.1</version$amp;>amp;$nbsp; 
        <configuration$amp;>amp;$nbsp; 

        </configuration$amp;>amp;$nbsp; 
     </plugin>

其实就是换个插件版本就ok了
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值