1

I have migrated a maven project to eclipse from netbeans but get this error,

Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-install-plugin:2.5:install-file (execution: default, phase: initialize)

Can someone tell me what the problem is and how to resolve it? Do I need to install a plugin for eclipse?

PerceptualRobotics
  • 422
  • 1
  • 3
  • 18

1 Answers1

0

You need to add a 'pluginManagement' section to your pom file. something like this:

<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>
                                        org.apache.maven.plugins
                                    </groupId>
                                    <artifactId>
                                        maven-install-plugin
                                    </artifactId>
                                    <versionRange>
                                        [2.5,)
                                    </versionRange>
                                    <goals>
                                        <goal>install-file</goal>
                                    </goals>
                                </pluginExecutionFilter>
                                <action>
                                    <ignore></ignore>
                                </action>
                            </pluginExecution>
                        </pluginExecutions>
                    </lifecycleMappingMetadata>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
pbuchheit
  • 1,371
  • 1
  • 20
  • 47