Reputation: 2599
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
Upvotes: 17
Views: 40426
Reputation: 11
I had a similar problem. Eclipse said
Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-checkstyle-plugin:3.0.0:checkstyle (execution: default, phase: validate)
After removed checkstyle, there have been other similar problems.
To solve it, I click the quick fixes option: "Discover new m2e connectors". Eclipse list automatically what needed. All you have to do is to click the Finish button.
My Eclipse version is Oxygen.2(4.7.2). Hope this helps.
Upvotes: 0
Reputation: 5307
What worked for me was to install the M2E Groovy-Eclipse integration but also to add more configuration to the maven compiler plugin in order to work with java and groovy classes:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<compilerId>groovy-eclipse-compiler</compilerId>
<source>1.7</source>
<target>1.7</target>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>2.8.0-01</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>2.1.8-01</version>
</dependency>
</dependencies>
</plugin>
Upvotes: 0
Reputation: 141
In Maven there are few things need to check before this error.
Are you able to download the jars from .m2 Repository? -> For this Just delete the repository folder under .m2 Folder and try to update the Maven projects. Then you can see the new Repository folder under .m2 folder. -> Check all the maven-plugin jars are came under org/apache/maven
Check are you able to open the Repository url what ever you mentioned in Settings.xml file -> Open ths url in any browser and check whether are you able to open or not.
Some times thrid party repository jars might be corrupted. -> This will take care by thrid party persons -> Ex: if you are pointing to Nexus repository, they have to upload the required maven jars once again. Some times while uploading the jars might be corrupt.
Upvotes: 0
Reputation: 17895
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.
To fix this, you can grab the m2e connector that springsource provides.
http://dist.springsource.org/release/GRECLIPSE/e4.2/
To use it:
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.
Upvotes: 28