Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin
2012-12-18 14:14
639 查看
解决方案1:
加入如下代码:
<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.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>test-compile</goal>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
解决方案2:
将plugins嵌套进pluginManagement
configure project builds that inherit from this one. However, this only configures plugins that are actually referenced within the plugins element in the children. The children have every right to override pluginManagement definitions.
If we added these specifications to the plugins element, they would apply only to a single POM. However, if we apply them under the pluginManagement element, then this POM and all inheriting POMs that add the maven-jar-plugin to the build will get the pre-process-classes
execution as well. So rather than the above mess included in every child pom.xml, only the following is required:
加入如下代码:
<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.codehaus.mojo</groupId>
<artifactId>aspectj-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>test-compile</goal>
<goal>compile</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
解决方案2:
将plugins嵌套进pluginManagement
<build> <pluginManagement> <plugins> <plugin> ... </plugin> <plugin> ... </plugin> .... </plugins> </pluginManagement> </build>
pluginManagement 的官方介绍:
pluginManagement: is an element that is seen along side plugins. Plugin Management contains plugin elements in much the same way, except that rather than configuring plugin information for this particular project build, it is intended toconfigure project builds that inherit from this one. However, this only configures plugins that are actually referenced within the plugins element in the children. The children have every right to override pluginManagement definitions.
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> ... <build> ... <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.2</version> <executions> <execution> <id>pre-process-classes</id> <phase>compile</phase> <goals> <goal>jar</goal> </goals> <configuration> <classifier>pre-process</classifier> </configuration> </execution> </executions> </plugin> </plugins> </pluginManagement> ... </build> </project>
If we added these specifications to the plugins element, they would apply only to a single POM. However, if we apply them under the pluginManagement element, then this POM and all inheriting POMs that add the maven-jar-plugin to the build will get the pre-process-classes
execution as well. So rather than the above mess included in every child pom.xml, only the following is required:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> ... <build> ... <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> </plugin> </plugins> ... </build> </project>
相关文章推荐
- Maven经典错误之二- Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-mave
- Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:aspectj-maven-plugin:1.3.
- 修复 Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.8:add-source (execution: add-source, phase: generate-sources)
- Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:xml-maven-plugin:1.0:tran
- eclipse提示Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-com
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-antrun-plugi
- Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-plugin-plugi
- maven 报类似 “Plugin execution not covered by lifecycle configuration: org.antlr:antlr3-maven-plugin:3.4:antlr (execution: default, phase: generate-sources)” 错误 的解决方案
- Plugin execution not covered by lifecycle configuration: aspectj-maven-plugin:1.8
- maven 问题 Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-res
- 解决Maven出现Plugin execution not covered by lifecycle configuration 错误
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- Maven项目:Plugin execution not covered by lifecycle configuration 解决方案
- Maven项目提示:Plugin execution not covered by lifecycle configuration
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- 在POM配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案
- MyEclipse导入Maven项目报错 Plugin execution not covered by lifecycle configuration:
- eclipse使用maven在pom配置Maven plugin提示错误“Plugin execution not covered by lifecycle configuration”的解决方案