spring - 生命周期配置未涵盖插件执行

标签 spring maven spring-mvc pom.xml eclipse-kepler

Spring 入门

背景:到目前为止,我一直致力于核心JAVA,现在我需要切换到MVC
尝试制作我的第一个 Spring MVC Hello World 示例 from this tutorial ,我在 pom.xml 上遇到以下错误:

Multiple annotations found at this line:
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:
     2.3.2:compile (execution: default-compile, phase: compile)
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:
     2.5:testResources (execution: default-testResources, phase: process-test-resources)
    - <packaging>war</packaging>
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-resources-plugin:
     2.5:resources (execution: default-resources, phase: process-resources)
    - Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:
     2.3.2:testCompile (execution: default-testCompile, phase: test-compile)

pom.xml 的这一行生成错误:

  <packaging>war</packaging>

pom.xml

<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/maven-v4_0_0.xsd">
      <modelVersion>4.0.0</modelVersion>
      <groupId>com.javacodegeeks.snippets.enterprise</groupId>
      <artifactId>springexample</artifactId>
      <packaging>war</packaging>
      <version>0.0.1-SNAPSHOT</version>
      <name>springexample Maven Webapp</name>
      <url>http://maven.apache.org</url>
      <dependencies>
        <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <scope>test</scope>
        </dependency>

        <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${spring.version}</version>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-webmvc</artifactId>
                <version>${spring.version}</version>
            </dependency>
      </dependencies>
      <build>
        <finalName>springexample</finalName>
      </build>

        <properties>
            <spring.version>4.0.2.RELEASE</spring.version>
        </properties>
</project>

marketplace 中搜索后,我什至安装了 m2e

请放轻松,这个问题的出现是为了尝试学习一些对我来说全新的东西。
我需要一些插件或其他东西来解决这个问题吗?如果是这样,是否有任何通用类型的插件可以避免将来出现任何此类错误?
IDE: Eclipse Kepler

附:

我已经浏览过旧线程,但没有运气:

最佳答案

这不是停止使用 m2e 的理由,您只需右键单击这些错误并使用“快速修复”命令即可修复这些错误。您可以选择在 Marketplace 中搜索可用的生命周期配置器来自动处理它,或者,如果没有,您可以告诉 m2e 忽略该插件。

关于spring - 生命周期配置未涵盖插件执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23593683/

相关文章:

sql - 设置过高的批量大小有什么缺点?

java - 编辑Java实体文件相当于在Spring Roo中生成then吗?

maven - Gradle构建-Maven Modello

java - 如何避免 DuplicateProjectException 异常

java - Maven 如何在复制资源时仅包含选定的文件夹

java - 有没有办法在 @Controller 方法中访问 HttpRequest 类型

java - Spring安全Oauth2 token 错误: "Missing grant type"

java - 如何在抛出 BeanCreationException 后关闭应用程序

json - Spring Boot - RESTful Controller 、hateoas 和 JSON

spring - 环境变量-Spring、Tomcat