pom.xml报Plugin execution not covered by lifecycle configuration错误

环境

eclipse 4.3.0

maven 3.0.4

m2e 1.4.0

出现场景

以前的老项目,在我的环境(我的环境较新)下,别人老环境不报错。

错误示例

一个错误示例,子项目引用了父项目,子项目parent标签处报错如下:

Multiple annotations found at this line:

- maven-enforcer-plugin (goal "enforce") is ignored by m2e.

- Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.3.1:compile (execution:

default, phase: compile)

解决办法

官网给出解释及解决办法:http://wiki.eclipse.org/M2E_plugin_execution_not_covered

这里有人说下面这样也可以解决, 即 <plugins> 标签外再套一个 <pluginManagement> 标签,我试验是成功的:

http://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-sprin

<build>

<pluginManagement>

<plugins>

<plugin> ... </plugin>

<plugin> ... </plugin>

....

</plugins>

</pluginManagement>

</build>

但是有时候父项目pom不能被修改,可用官网最后给出的解决办法:

Window-Perferences-Maven-Lifecycle Mapping

保存如下内容:

<?xml version="1.0" encoding="UTF-8"?>

<lifecycleMappingMetadata>

<pluginExecutions>

<pluginExecution>

<pluginExecutionFilter>

<groupId>org.codehaus.mojo</groupId>

<artifactId>aspectj-maven-plugin</artifactId>

<goals>

<goal>compile</goal>

</goals>

<versionRange>[1.3,)</versionRange>

</pluginExecutionFilter>

<action>

<ignore />

</action>

</pluginExecution>

</pluginExecutions>

</lifecycleMappingMetadata>

记得点击 ”Reload workspace lifecycle mappings metadata“按钮

时间: 2024-10-07 18:35:36

pom.xml报Plugin execution not covered by lifecycle configuration错误的相关文章

解决Maven报Plugin execution not covered by lifecycle configuration

环境 eclipse 4.3.0 maven 3.0.4 m2e 1.4.0 出现场景 以前的老项目,在我的环境(我的环境较新)下,别人老环境不报错. 错误示例 一个错误示例,子项目引用了父项目,子项目parent标签处报错如下: Multiple annotations found at this line: - maven-enforcer-plugin (goal "enforce") is ignored by m2e. - Plugin execution not cover

解决Maven出现Plugin execution not covered by lifecycle configuration 错误

http://blog.163.com/xh_ding/blog/static/1939032892015222368827/ 解决Maven出现Plugin execution not covered by lifecycle configuration 错误

groovy入门()Groovy插件安装:Maven报Plugin execution not covered by lifecycle configuration

参考链接:http://www.cnblogs.com/rightmin/p/4945797.html 1.引入groovy的jar包 2.引入groovy编译插件 3.遇到问题 Plugin execution not covered by lifecycle configuration 4.解决办法 quickfix+删除重导入工程大法!! 下面是网上介绍的解决方法,下次遇到再试试: 5.附录代码 - eclipse开发Groovy代码,与java集成,maven打包编译 5.1.设置类路径

在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案

eclipse在其POM文件的一处提示出错如下: Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (execution: default-compile, phase: compile) 这表示m2e在其执行maven的生命周期管理时没有定义该插件,所以提示出错,其实m2e对此是提供了扩展机制的,我们可以通过如下操

MyEclipse导入Maven项目报错 Plugin execution not covered by lifecycle configuration:

web项目使用到mybatis,需要使用mybatis的自动生成代码插件,配置build部分如下: 1 <build> 2 <pluginManagement></pluginManagement> 3 <plugins> 4 <plugin> 5 <artifactId>maven-war-plugin</artifactId> 6 </plugin> 7 <plugin> 8 <artif

Plugin execution not covered by lifecycle configuration: aspectj-maven-plugin:1.8

现象: eclipse导入existing maven project,(父项目包含很多子项目),子项目的pom.xml报错: Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.8:compile (execution: default,phase:compile) 解决方法一: enclose all the plugin tags inside a

Maven在导入其他项目时报错:Plugin execution not covered by lifecycle configuration

这几天想把Spring 攻略第二版完整的学习下,所以就在网上下载了该教材的源码,寻思边看书边练习!之前有过一些Maven开发的相关经验,觉得Maven在引入jar包上的配置还是很方便的,所以这次源码的Maven配置我倒是不担心,没想到项目导入后就报了一堆错误,一个一个的去解决,很多问题网上都有解决办法,就剩下一个问题折腾好久才解决掉,现将问题的解决过程记录如下: 1 问题描述 Plugin execution not covered by lifecycle configuration: org

Plugin execution not covered by lifecycle configuration的解决方案

pom配置文件中,提示错误:Plugin execution not covered by lifecycle configuration. 如图: 这表示m2e在其执行maven的生命周期管理时没有定义该插件,所以提示出错.增加声明即可解决 两种方法就行修复: 一.通过eclipse,自动修复:鼠标放在出错处,出现提示框,点击"Mark goal run as...."即可. 二.手动修改: 进入Window->Preferences->Maven配置,进入Lifecyc

MAVEN “Plugin execution not covered by lifecycle configuration”

pom文件中报错提示: Plugin execution not covered by lifecycle configuration: net.alchim31.maven:yuicompressor-maven-plugin:1.5.1:compress (execution: default, phase: process- resources) 上网一搜,很多人说在<plugins>标签外面加<pluginManagement>标签就可以了,加了pluginManageme