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,

Source: Internet
Author: User

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>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.