0
votes

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 /Project line 1 Maven Project Build Lifecycle Mapping Problem

Here is the POM.xml

<project xmlns="maven.apache.org/POM/4.0.0"; xmlns:xsi="w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="maven.apache.org/POM/4.0.0 maven.apache.org/xsd/maven-4.0.0.xsd">;    <modelVersion>4.0.0</modelVersion> 
 <groupId>Assignment</groupId>
 <artifactId>ApsalarAssignment</artifactId>
 <version>0.0.1-SNAPSHOT</version>
</project>

I am getting this error on Kepler, Eclipse while making a new Maven Project. Don't know how to figure it out as I am new to Maven as well as Eclipse. Any help would be highly appreciated.

1
please post your pom.xmlKarthik Prasad
@KarthikPrasad here you go Sir <project xmlns="maven.apache.org/POM/4.0.0" xmlns:xsi="w3.org/2001/XMLSchema-instance" xsi:schemaLocation="maven.apache.org/POM/4.0.0 maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>Assignment</groupId> <artifactId>ApsalarAssignment</artifactId> <version>0.0.1-SNAPSHOT</version> </project>haadi
Please edit and add it questionKarthik Prasad
open the pom File, it should state your error, click on the red error and eclipse should show you some quick fixes for the problem. Select searching for connector and install the appropriate connectorAbsurd-Mind
It says that I have a spelling mistake in the project tag as I have highlighed. <project xmlns But it was created by eclipse and I did not have anything to do with it.haadi

1 Answers

0
votes

This problem is due to missing <pluginManagement> tag in pom.xml

In order to fix this error in eclipse, you need to <pluginManagement> tag around your <plugins> tag, like shown below.

<build>
    <pluginManagement>
        <plugins>
            <plugin> ... </plugin>
            <plugin> ... </plugin>
                  ....
        </plugins>
    </pluginManagement>
</build> 

As per Maven documentation

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 to 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.

Shishir