为什么Eclipse Luna Maven项目为maven-compiler-plugin给出错误? [英] Why do Eclipse Luna Maven projects give errors for maven-compiler-plugin?

查看:130
本文介绍了为什么Eclipse Luna Maven项目为maven-compiler-plugin给出错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在Eclipse Luna中创建新的Maven项目时,一旦创建该项目,就会出现此错误:

When I create a new Maven project in Eclipse Luna it gives this error as soon as the project is created:

生命周期配置未涵盖插件执行:org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile(执行:default-compile,阶段:compile)pom.xml/intercept行1 Maven项目建立生命周期映射问题

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (execution: default-compile, phase: compile) pom.xml /intercept line 1 Maven Project Build Lifecycle Mapping Problem

除pom.xml之外,项目中什么都没有,并且我无法添加Java类,因为它认为这不是Java项目.如果我从命令行运行mvn clean install,它将成功构建.看起来Luna破坏了Eclipse-Maven集成.

There is nothing in the project except for the pom.xml, and I can't add a Java class because it thinks it is not a Java project. If I run mvn clean install from the command line it builds successfully. This looks like it is the Eclipse - Maven integration that is broken in Luna.

开普勒(Kepler)不会发生这种情况.卢娜(Luna)发生了什么事?我在防火墙和代理服务器后面,这些防火墙和代理服务器阻止某些类型的Internet访问.

This doesn't happen with Kepler. What got broken in Luna? I am behind a firewall and a proxy server that prevent certain kinds of internet access.

谢谢.

推荐答案

来自 https://issuetracker .springsource.com/browse/STS-4236 并向该网站上提供答案的用户表示感谢:

From https://issuetracker.springsource.com/browse/STS-4236 and crediting the user on that site who provided the answer:

Martin Lippert(c)添加了评论-15年10月27日上午7:04

Martin Lippert (c) added a comment - 27/Oct/15 7:04 AM

我可以重现此行为,但尚未找到其根本原因.更新STS之后似乎会发生这种情况,但无论出于何种原因都不会更新m2e组件.

I can reproduce this behavior, but can't find the root cause of it yet. It seems to happen after updating STS, but not updating the m2e components for whatever reason.

解决此问题的方法是通过通过以下方式中的安装新软件"安装这些更新来更新STS中使用的m2e和m2e-wtp组件:

The way to solve this is to update the used m2e and m2e-wtp components in STS by installing those updates via "Install New Software" from:

http://download.eclipse.org/technology/m2e/releases
http://download.eclipse.org/m2e-wtp/releases/mars/

该更新之后,生命周期映射应再次正常运行. 在JDK6上运行时,我仍然遇到问题,但这是另一回事.

After that update, the lifecycle mapping should work fine again. I am still getting an issue when running this on a JDK6, but that is a different story.

这篇关于为什么Eclipse Luna Maven项目为maven-compiler-plugin给出错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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