生命周期配置maven错误未涵盖插件执行

Ami*_*nai 17 maven

我导入了一个现有的maven项目但是我在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
Run Code Online (Sandbox Code Playgroud)

但我不明白为什么,

这是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>
Run Code Online (Sandbox Code Playgroud)

先感谢您

gMa*_*ale 27

这是Groovy maven配置的问题.更具体地说,m2e连接器问题,一般来说,这是一场噩梦.此链接包含有关m2e连接器混乱的良好信息.

摘要

要解决此问题,您可以获取springource提供的m2e连接器.

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

细节

要使用它:

  1. 单击帮助>安装新软件...
  2. 将上面的URL粘贴到"使用者:"字段中
  3. 展开"用于Groovy-Eclipse的m2e配置器"
  4. 选择第一个选项"Groovy-Eclipse m2e Integration"并安装它

安装Groovy-Eclipse M2E Integratoin

我还建议从Eclipse Marketplace安装"Groovy/Grails Tool Suite for Eclipse"(GGTS).我刚刚在Eclipse Kepler中完成了这两个(在接口上安装GGTS),它解决了上面的确切问题.此修复程序也适用于Juno.

  • 答对了!@Amira Manai您应该将此标记为正确答案. (3认同)