生命周期配置Maven错误未涵盖插件执行 [英] Plugin execution not covered by lifecycle configuration maven error

查看:80
本文介绍了生命周期配置Maven错误未涵盖插件执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我导入了一个现有的maven项目,但在pom.xml中遇到了一些错误:

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

但是我不明白为什么,

这是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>

提前谢谢

推荐答案

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

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.

要解决此问题,您可以抓住springsource提供的m2e连接器.

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

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

要使用它:

  1. 点击帮助>安装新软件...
  2. 在工作方式:"字段中粘贴上面的网址
  3. 展开用于Groovy-Eclipse的m2e Configurator"
  4. 选择第一个选项"Groovy-Eclipse m2e集成"并安装

我还建议从Eclipse Marketplace安装用于Eclipse的Groovy/Grails工具套件"(GGTS).我只是在Eclipse Kepler中完成了这两个步骤(先安装GGTS,然后再安装连接器),它完全解决了您在上面遇到的问题.此修补程序也可在Juno中使用.

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.

这篇关于生命周期配置Maven错误未涵盖插件执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆