m2eclipse报错:Plugin execution not covered by lifecycle configuration

   eclipse添加m2eclipse插件,导入maven项目时,报错:Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-antrun-plugin:1.7。


解决办法:

1,官方:http://wiki.eclipse.org/M2E_plugin_execution_not_covered

2,快速解决:pom.xml文件中的<plugins>标签的上部添加如下代码,即可解决:

<pluginManagement>
     <plugins>
       <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build
         itself. -->
       <plugin>
         <groupId>org.eclipse.m2e</groupId>
         <artifactId>lifecycle-mapping</artifactId>
         <version>1.0.0</version>
         <configuration>
           <lifecycleMappingMetadata>
             <pluginExecutions>
               <pluginExecution>
                 <pluginExecutionFilter>
                   <groupId>org.apache.maven.plugins</groupId>
                   <artifactId>maven-antrun-plugin</artifactId>
                   <versionRange>[1.7,)</versionRange>
                   <goals>
                     <goal>run</goal>
                   </goals>
                 </pluginExecutionFilter>
                 <action>
                   <ignore />
                 </action>
               </pluginExecution>
             </pluginExecutions>
           </lifecycleMappingMetadata>
         </configuration>
       </plugin>
     </plugins>
   </pluginManagement>


你可能感兴趣的:(maven,m2eclipse,plugin,execution,not,covered)