Why do Eclipse Luna Maven projects give errors for maven-compiler-plugin?

家住魔仙堡 提交于 2019-12-07 20:29:54

问题


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

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

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.

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.

Thanks.


回答1:


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

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

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.

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/

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.



来源:https://stackoverflow.com/questions/26366376/why-do-eclipse-luna-maven-projects-give-errors-for-maven-compiler-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!