解决Maven报Plugin execution not covered by lifecycle configuration
当在plugins中添加新的插件时,一直报Plugin execution not covered by lifecycle configuration错误。
解决方法:
方法一、在<plugins>外添加<pluginManagement>
即:
<build> <pluginManagement> <plugins> <plugin> ... </plugin> <plugin> ... </plugin> .... </plugins> </pluginManagement> </build>
如果不行,使用方法二:
Window-Perferences-Maven-Lifecycle Mapping
在上图的路径中创建lifecycle-mapping-metadata.xml文件并添加如下内容
<?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”