Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Using the JDT compiler?

m2e uses jdt compiler by default when compiling classes inside Eclipse
workspace. This is done by reading maven-compiler-plugin configuration
and mapping it to JDT project settings. At the moment m2e only knows how
to map configuration of compilerId=javac and this is why you see "plugin
execution not covered" errors.

The wiki page you reference is not complete yet, but it is rather high
on our priority list and I expect to have more details soon-ish (sorry,
can't promise anything more specific).

--
Regards,
Igor

On 11-06-13 5:43 PM, Stephan Herrmann wrote:
Hi,

I'm currently developing an integration for m2e to support Object Teams.
This should be easy, given that the the OT/J compiler is derived from the
JDT compiler.

However, I had the impression that with current tool versions it isn't even
possible to use the JDT compiler via m2e?

(Note, I don't consider myself a maven guru, so all I write about maven
could be just silly)

To me, the following looked most promising:
- use maven-compiler-plugin
- set compilerId to jdt
- declare dependency on tycho-compiler-jdt
I thought I should be done.

BUT: I got "Plugin execution not covered by lifecycle configuration:..."
OK, I found http://wiki.eclipse.org/M2E_plugin_execution_not_covered
which tells me, I must define a lifecycle mapping, but has no pointer to
*how* this is done.
The best info I could find on this subject:
+
https://docs.sonatype.org/display/M2ECLIPSE/Lifecycle+mapping+configuration+priorities
   - gives a good conceptual overview, just no details at all
+ The sources of org.eclipse.m2e.jdt
   - this is the only location where I found showing an actual lifecycle
    mapping in practice

Suggestion: wouldn't you want to link the page from sonatype from
the Eclipse wiki?

Digging deeper suggests that I'm between a rock and a hard place:

1) I need a lifecycle mapping for packaging "jar" and compilerId "jdt".
2) org.eclipse.m2e.jdt provides a lifecycle mapping for packaging "jar"
   and compilerId "javac"
3) I cannot have two lifecycle mappings for "jar"
EOS

What am I missing?
Stephan

BTW: From my naive thinking I actually expected m2e to use the JDT
compiler by default. Looks funny to ship a JDT integration that works
hard to bypass the JDT, especially when this is being developed at
Eclipse.org.
_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users


Back to the top