首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

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

2012-07-15 
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>   
      <artifactId>maven-war-plugin</artifactId>   
      <version>2.1.1</version>  
        <configuration>  

        </configuration>  
     </plugin>

热点排行