Setup Maven plugin connectors Error

12,621

Your error has nothing to do with the project or the maven configuration. It has to do with the fact that the new versions of Eclipse have the M2E (previously known as M2Eclipse) project built into it now.

The new version has been improved so that as it imports your Maven project it reads the pom and properly sets up the Eclipse project. To do this it needs various connectors, most of which are already available and configured to do the Right Thing. However, your plugin executions have not been pre-configured and so you need to tell M2E what you want to have happen when Eclipse does a Maven build.

For me, I configured M2E to "ignore" these executions by adding the following to BuildManagement:

            <plugin>
                <!--This plugin's configuration is used to store Eclipse m2e settings 
                    only. It has no influence on the Maven build itself. -->
                <groupId>org.eclipse.m2e</groupId>
                <artifactId>lifecycle-mapping</artifactId>
                <version>1.0.0</version>
                <configuration>
                    <lifecycleMappingMetadata>
                        <pluginExecutions>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-dependency-plugin</artifactId>
                                    <versionRange>[1.0,)</versionRange>
                                    <goals>
                                        <goal>copy-dependencies</goal>
                                        <goal>unpack</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore />
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.codehaus.mojo</groupId>
                                    <artifactId>hibernate3-maven-plugin</artifactId>
                                    <versionRange>[2.2,)</versionRange>
                                    <goals>
                                        <goal>hbm2ddl</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                            <pluginExecution>
                                <pluginExecutionFilter>
                                    <groupId>org.sonatype.flexmojos</groupId>
                                    <artifactId>flexmojos-maven-plugin</artifactId>
                                    <versionRange>[4.0-RC2,)</versionRange>
                                    <goals>
                                        <goal>compile-swc</goal>
                                        <goal>compile-swf</goal>
                                        <goal>copy-flex-resources</goal>
                                        <goal>generate</goal>
                                        <goal>test-compile</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore />
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>

Read all about it here:

How to solve "Plugin execution not covered by lifecycle configuration" for Spring Data Maven Builds

Share:
12,621
Maciej Zablocki
Author by

Maciej Zablocki

Updated on June 04, 2022

Comments

  • Maciej Zablocki
    Maciej Zablocki almost 2 years

    I am trying to import a project into Spring Source Tool Suite (latest version).

    The project was previously created from maven archetype cataloge.

    I am getting the errors shown on the screenshot.

    I was able to import the same project on a different machine but with the same maven repository (I copied the whole .m2 directory) without any problems.

    Note: all of those tree bundles: com.springsource.bundlor.maven1.0.0.RELEASE, i18n-maven-plugin, maven-dependency-plugin are present in .m2/repository dir

    Any idea on how to fix it?

    screenshot with my error on the address below:

    http://imageshack.us/photo/my-images/64/mavenpluginconnectors.png/

  • Martin Erlic
    Martin Erlic about 8 years
    Changing the Maven installation directory to an older version did not work for me. I feel as though this answer may vary greatly depending on your project's specific goals.
  • user1521567
    user1521567 about 8 years
    I'm not sure how you determine which maven version you would need, it was tribal knowledge on my project. Be sure you select the proper installation when you do the actual mvn build command though.
  • Line
    Line over 6 years
    @user1521567 and how did you determine it? :)
  • user1521567
    user1521567 over 6 years
    @Line someone on the team just knew