maven pom.xml文件报错 +Plugin execution not covered by lifecycle configuration:

来源:互联网 发布:王菲演唱会知乎 编辑:程序博客网 时间:2024/05/22 14:06

报错信息:

Multiple annotations found at this line:
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:2.5:testResources (execution:
     default-testResources, phase: process-test-resources)
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:2.5:resources (execution:
     default-resources, phase: process-resources)


解决方法:

在pom.xml中添加

<build>    <pluginManagement>        <plugins>            <plugin>                <groupId>org.eclipse.m2e</groupId>                <artifactId>lifecycle-mapping</artifactId>                <version>1.0.0</version>                <configuration>                    <lifecycleMappingMetadata>                        <pluginExecutions>                            <pluginExecution>                                <pluginExecutionFilter>                                    <groupId>org.apache.maven.plugins</groupId>                                    <artifactId>maven-resources-plugin</artifactId>                                    <versionRange>[2.0,)</versionRange>                                    <goals>                                        <goal>resources</goal>                                        <goal>testResources</goal>                                    </goals>                                </pluginExecutionFilter>                                <action>                                    <ignore />                                </action>                            </pluginExecution>                        </pluginExecutions>                    </lifecycleMappingMetadata>                </configuration>            </plugin>        </plugins>    </pluginManagement></build> 


阅读全文
0 0