首页 > 代码库 > Plugin execution not covered by lifecycle configuration: aspectj-maven-plugin:1.8
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 <pluginManagement> tag, like this:
<build> <pluginManagement> <plugins> <plugin> ... </plugin> <plugin> ... </plugin> .... </plugins> </pluginManagement></build>
尝试该方法后:在pom.xml文件中前部分的<parent>标签处报同样的错误,无法解决。
解决方法二:
Quickest way to solve this is:
use quick-fix on the error in pom.xml and select
Permanently mark goal run in pom.xml as ignored in Eclipse build
- this will generate the required boilerplate code for you.After that just replace the
<ignore/>
or <ignore></ignore>tag with<execute/>
tag in the generated configuration and you‘re done:
<action> <execute/> </action>
尝试该方法后,红叉消失。
解决方法三:
配置eclipse
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>
<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“按钮.refer to :
http://stackoverflow.com/questions/6352208/how-to-solve-plugin-execution-not-covered-by-lifecycle-configuration-for-sprin
http://blog.csdn.net/xxd851116/article/details/25197373
Plugin execution not covered by lifecycle configuration: aspectj-maven-plugin:1.8
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。