Eclipse 3.7 Indigo with M2E – lifecycle connectors

Posted byChristian Moser Posted on8. July 2011 Comments1

Recently Eclipse 3.7 Indigo with M2E Plugin 1.0.0 was released.  Since Eclipse 3.7, M2E is part of the Eclipse Foundation. I had expected better of it.

Since M2E 1.0.0, the plugin features a new life-cycle connector concept for maven-plugins. M2E users are now forced to provide a connector for every plugin used in their builds or if none connectors are available, to ignore the connectors. Unfortunately, to ignore the missing connectors the user is required to modify his pom files for M2E to work properly.

If a maven-plugin is missing a connector, M2E will show you errors like: Plugin execution not covered by lifecycle configruation: {plugin-GAV-goals} and prompts you to modify your project pom or parent pom as following:

<pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings
                    only. It has no influence on the Maven build itself. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            // plugin groupId
                                        </groupId>
                                        <artifactId>
                                            // plugin artifactId
                                        </artifactId>
                                        <versionRange>
                                            [1.0,) // plugin versions
                                        </versionRange>
                                        <goals>
                                            // plugin goals
                                            <goal>create</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        // M2E should ignore the plugin
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
     </pluginManagement>

 

 

This means that M2E is no longer an interpreter of Maven, it’s a modifier. It binds your independent Maven projects to a specific IDE, which is in my opinion the wrong path. I’d prefer a much more “lighter” Maven integration in Eclipse, for example like NetBeans 7.x does. This led to several discussions on the M2E mailing-list. As a result, I created an enhancement-request with collected and own suggestions from the list.

I hope an enhancement will soon be released, I could imagine that this will be a real deal breaker for several users to use M2E-1.0.0+.

Category

1 people reacted on this

Comments are closed.