Search code examples
mavenm2e

Making a decision on M2E lifecycle configurations


Importing a Maven project into Eclipse has brought up the error:

Plugin execution not covered by lifecycle configuration: 
org.codehaus.mojo:gwt-maven-plugin:2.1.0:resources (execution: default, phase: process-resources)

I'm no Maven expert, but it seems that this is an issue where M2E needs explicit instructions on how to process plugins bound to certain events.

Eclipse offers a quick fix to simply ignore these plugins, but you also have the option to execute the plugins, or install/create a project configurator.

Given that most people (myself included) are not going to be inclined to create a M2E extension, what general rules should you follow to determine if the plugins should be ignored or executed? It seems to me that these plugins are included for a reason, so should they be executed by default? Or is there some reason why executing be default is a bad idea?


Solution

  • The Eclipse build lifecycle is triggered repeatedly behind-the-scenes if "Build Automatically" is enabled.

    Thus we don't want the Maven Eclipse plugin to perform heavyweight tasks that consume IO/CPU. For example, copying dependencies or building package files.

    Better to trigger these manually from the command line.