0

Can Maven work with Eclipse?

I have Eclipse Neon. I'm trying to work on a project called "database".
Eclipse gives 2 errors:
Plugin execution not covered by lifecycle configuration:
org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (execution: default-compile, phase: compile)
pom.xml /database line 56 Maven Project Build Lifecycle Mapping Problem
The second error is the same thing with
... (execution: default-testCompile, phase: test-compile)

I've looked high and low for solutions and nothing works. Why does it work with Maven (and IntelliJ) but Eclipse can't handle it?

I tried something new today, running
mvn eclipse:eclipse
in the project's main directory and restarted eclipse when it prompted, but it didn't help...

I've tried all sorts of things from other answers, but can't get the problem to go away. I put a copy of the error in http://randy.strausses.net/blog/bug/

Thanks. The alternative is to give up using eclipse...

Randy Strauss
  • 93
  • 1
  • 7

1 Answers1

1

All Maven plugins listed in the pom.xml file(s) must be emulated by Java code for m2e to work with them. Many commonly used plugins have such Java snippets so they can be used inside Eclipse, but also many less commonly used plugins haven't and this is what is happening here.

You can disable the specific troublesome plugin and hope that it does not do something important that the code building needs, or you can ask Eclipse to look for a plugin. You might be lucky. You will also most likely need to compile from the command line on a regular basis.

Note that Netbeans and IntelliJ have much better support for Maven out of the box. You may want to try using one of these to work with this project.

Thorbjørn Ravn Andersen
  • 73,784
  • 33
  • 194
  • 347