简体   繁体   English

Eclipse Kepler项目配置

[英]Eclipse Kepler Project Configuration

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:2.5:resources (execution: default-resources, phase: process-resources) pom.xml /Project line 1 Maven Project Build Lifecycle Mapping Problem 生命周期配置未涵盖插件执行:org.apache.maven.plugins:maven-resources-plugin:2.5:resources(执行:default-resources,阶段:process-resources)pom.xml / Project line 1 Maven项目构建生命周期映射问题

Here is the POM.xml 这是POM.xml

<project xmlns="maven.apache.org/POM/4.0.0"; xmlns:xsi="w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="maven.apache.org/POM/4.0.0 maven.apache.org/xsd/maven-4.0.0.xsd">;    <modelVersion>4.0.0</modelVersion> 
 <groupId>Assignment</groupId>
 <artifactId>ApsalarAssignment</artifactId>
 <version>0.0.1-SNAPSHOT</version>
</project>

I am getting this error on Kepler, Eclipse while making a new Maven Project. 在制作新的Maven项目时,我在Eclipse开普勒上遇到此错误。 Don't know how to figure it out as I am new to Maven as well as Eclipse. 我不熟悉Maven和Eclipse,所以不知道如何解决。 Any help would be highly appreciated. 任何帮助将不胜感激。

This problem is due to missing <pluginManagement> tag in pom.xml 此问题是由于pom.xml中缺少<pluginManagement>标记引起的

In order to fix this error in eclipse, you need to <pluginManagement> tag around your <plugins> tag, like shown below. 为了修复eclipse中的此错误,您需要在<plugins>标记周围使用<pluginManagement> <plugins>标记,如下所示。

<build>
    <pluginManagement>
        <plugins>
            <plugin> ... </plugin>
            <plugin> ... </plugin>
                  ....
        </plugins>
    </pluginManagement>
</build> 

As per Maven documentation 根据Maven文档

pluginManagement is an element that is seen along side plugins. pluginManagement是在侧面插件中可以看到的元素。 Plugin Management contains plugin elements in much the same way, except that rather than configuring plugin information for this particular project build, it is intended to configure project builds that inherit from this one. 插件管理包含插件元素的方式几乎相同,除了它不是为该特定项目构建配置插件信息,而是要配置从此继承的项目构建。 However, this only configures plugins that are actually referenced within the plugins element in the children. 但是,这仅配置在子级的plugins元素内实际引用的插件。 The children have every right to override pluginManagement definitions. 子级有权覆盖pluginManagement定义。

Shishir 希希尔

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM