Maven project-fixed Plugin execution not covered by lifecycle configuration: org. codehaus. mojo: build-helper-maven-plugin: 1.8: add-resource (execution: add-resource, phase: generate-resources) pom. xml error,
1: pom. xml Code
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.8</version> <executions> <execution> <id>add-resource</id> <phase>generate-resources</phase> <goals> <goal>add-resource</goal> </goals> <configuration> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> </includes> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.19.1</version> <configuration> <useSystemClassLoader>false</useSystemClassLoader> </configuration> </plugin>
2: the error message is as follows:
Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:build-helper-maven-plugin:1.8:
add-resource (execution: add-resource, phase: generate-resources) pom.xml
3: Error cause
The m2e plug-in of eclipse does not support execution.
4: Solution
<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> build-helper-maven-plugin </artifactId> <versionRange> [1.8,) </versionRange> <goals> <goal>add-source</goal> </goals> </pluginExecutionFilter> <action> <ignore></ignore> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin>