Gyeo-wool
Gyeo-wool

Reputation: 13

Plugin execution not covered by lifecycle configuration:org.apache.maven.plugins

environment: Eclipse 4.4.2 Tomcat : 7 java 1.7 maven 3.5 STS packages installed.

This is my condition right now. when I made Spring legacy project(MVC) there was some problem in pom.xml.

First of all, Error occurred in war but after I clean the maven and update, the error was gone. but after that, the part of occurred the error. I don't know how to fix it.

But strangely I did this just like same on my other laptop yesterday, There wasn't any problem.

CentOS7
java 1.8
Eclipse 4.7.0
Tomcat 8.5.16

Here is the section of pom file

<plugin>                 
//plugin execution not covered by lifecycle configuration:org.apache.maven.plugins:maven-compiler-plugin2.5.1:testCompile(execution:default-testComplile, phase:test-conpile)").

<groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>2.5.1</version>
            <configuration>
                <source>1.7</source>
                <target>1.7</target>
                <compilerArgument>-Xlint:all</compilerArgument>
                <showWarnings>true</showWarnings>
                <showDeprecation>true</showDeprecation>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.2.1</version>
            <configuration>
                <mainClass>org.test.int1.Main</mainClass>
            </configuration>
        </plugin>
    </plugins>
</build>
</project>

Upvotes: 1

Views: 9758

Answers (3)

isa
isa

Reputation: 784

Once done , try doing a Update Project by Right Click Project , Maven->Update Maven Project and select codebase and do check the Force Update of Snapshot/Release check box. This will update your maven build and will surely remove your errors with pom.xml

Upvotes: 2

bobanahalf
bobanahalf

Reputation: 879

Posting my solution, in case anyone else runs into a similar error. I had a very similar issue on a much later version of Eclipse, etc. No amount of Maven>Update Project solved it.

I ran manually ran "mvn clean install" from the command line, and it cleaned up the errors in eclipse.

  • Eclipse Neon
  • maven-compiler-plugin 3.8.1

Upvotes: 1

Ayushya
Ayushya

Reputation: 10407

You need to include the plugins in one of the life-cycles as pointed out by the error. If you want these plugins to be packed in the war file then enclose them in the <packaging></packaging>. But you will be needed to include that in a life cycle.

Upvotes: 0

Related Questions