FWIW, I've created a plugin to allow maven-compiler-plugin using compilerId=eclipse to be used transparently with m2e (by using org.eclipse.m2e.jdt.javaConfigurator).
Source code is available from https://github.com/fbricon/m2e-jdt-compiler for now (I may transfer it to the jbosstools organization later this week), but most importantly, you can install ci builds from this p2 update site :
Out of the box, m2e only supports maven
compiler plugin with
compilerId=javac. To make it work for other compilers,
compilerId=jdt in
your specific case, you need to add this explicit lifecycle
mapping
configuration in your (parent) pom.xml
I know I am not the first to ask this question, but I want
to make sure
I understand correctly the error I am seeing in Eclipse with
m2e 1.0.100
on all my Maven projects.
So I have a large multi-module Maven project and almost all
of them show
me an error with the message "/Plugin execution not covered
by lifecycle
configuration:
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(execution:
default-compile,
phase: compile)/", and the same thing for testCompile.
I have recently modified the compiler used by m-c-p to use
this one
(since the one from Oracle lamely crashes while compiling):
<groupId>org.sonatype.tycho</groupId>
<artifactId>tycho-compiler-jdt</artifactId>
<version>0.11.1</version>
So, my understanding is that M2E puts an error on my pom.xml
(and
therefore my project) because it does not handle directly
this
configuration of the maven-compiler? Is this correct?
If yes, is not it a bit strong to put an error on this while
we know
that the eclipse compiler will do the job anyway? I was
quite frustrated
to see that now all my projects are marked as in error while
they all
work.
I can definitely not tell other developers that they first
have to
select all 66 projects and go on them one by one to indicate
that M2E
can safely ignore this. Could not this be simply a warning
instead of an
error?
Or am I just not understanding something on the way M2E and
Eclipse work
together?