Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plugin execution not covered by lifecycle configuration maven error

Tags:

maven

i imported an existing maven project but i'm getting some errors in the pom.xml :

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

 compiler-plugin:2.3.2:compile (execution: default-compile, phase: compile) pom.xml 

 /org.squashtest.csp.tools.unittest line 50 Maven Project Build Lifecycle Mapping Problem

but i can't understand why ,

Here's the pom.xml :

 <?xml version="1.0"?>
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org  
  /2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0   
  http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
<parent>
    <artifactId>squashtest-csp-tools</artifactId>
    <groupId>org.squashtest.tm</groupId>
    <version>1.2.0.RELEASE</version>
</parent>
<artifactId>org.squashtest.csp.tools.unittest</artifactId>
<name>Squashtest CSP - Tools module - Unit tests library</name>
<description>Library  of classes used for unit-testing other Squashtest        
     components</description>

<dependencies>
    <!-- ====== GROOVY ====== -->
    <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <scope>compile</scope>
    </dependency>
    <!-- ====== /GROOVY ====== -->
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>org.squashtest.org.hibernate.core</artifactId>
        <version>${hibernate.version}</version>
        <scope>compile</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>org.unitils</groupId>
        <artifactId>unitils-database</artifactId>
        <version>3.1</version>
        <scope>compile</scope>
        <optional>true</optional>
        <exclusions>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-nop</artifactId>
            </exclusion>
            <exclusion>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>
<build>
    <sourceDirectory>src/main/groovy</sourceDirectory>
    <testSourceDirectory>src/test/groovy</testSourceDirectory>
    <plugins>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <executions><execution></execution></executions>
      <version>2.3.2</version>
      </plugin> 
    </plugins>
 </build>
</project>

Thank you in advance

like image 540
Amira Manai Avatar asked Jul 12 '12 08:07

Amira Manai


People also ask

How do I fix a plugin error in eclipse?

You will need to do a Maven > Update project to fix the same error in any other project as well. Window > Preferences > Maven > Errors/Warnings > Plugin execution not covered by life-cycle configuration.

What is the Maven lifecycle?

Maven Lifecycle: Below is a representation of the default Maven lifecycle and its 8 steps: Validate, Compile, Test, Package, Integration test, Verify, Install and Deploy.

What is AspectJ Maven plugin?

Maven AspectJ Plug-inIt offers the ability to weave aspects on the classes generated and dependency libraries. This also includes the ability to add dependencies on libraries with aspects. For more information on the functionality provided by this plugin, please see the Goals document.

What is Maven Antrun plugin?

This plugin provides the ability to run Ant tasks from within Maven. You can even embed your Ant scripts in the POM! It is not the intention of this plugin to provide a means of polluting the POM, so it's encouraged to move all your Ant tasks to a build.


1 Answers

This is an issue with Groovy maven configuration. More specifically, m2e connector issues which are, generally speaking, a nightmare. This link contains good info about the m2e connector mess.

Summary

To fix this, you can grab the m2e connector that springsource provides.

http://dist.springsource.org/release/GRECLIPSE/e4.2/

Details

To use it:

  1. Click Help > Install new software...
  2. Paste the URL above in the "Work With:" field
  3. Expand "m2e Configurator for Groovy-Eclipse"
  4. Choose the first option "Groovy-Eclipse m2e Integration" and install it

Install Groovy-Eclipse M2E Integratoin

I would also recommend installing the "Groovy/Grails Tool Suite for Eclipse" (GGTS) from the Eclipse Marketplace. I just did both of these (installing GGTS then the connector) in Eclipse Kepler and it solved the exact issue you had, above. This fix also works in Juno.

like image 137
gMale Avatar answered Oct 27 '22 20:10

gMale