How to fix maven-dependency-plugin (goals “copy-dependencies”, “unpack”) is not supported by m2e in Eclipse

Filed Under: Java

Recently when I imported a Maven Project in Eclipse Indigo, it was showing following error in the project – maven-dependency-plugin (goals “copy-dependencies”, “unpack”) is not supported by m2e.

The issue was coming because Eclipse M2E doesn’t support execution, more details are at .
However, if you build the project, it doesn’t cause any issue.

To resolve this error all you need to do is copy following code just before your closing tag of the build.


<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-dependency-plugin
	</artifactId>
	<versionRange>
		[2.0,)
	</versionRange>
	<goals>
		<goal>unpack</goal>
	</goals>
</pluginExecutionFilter>
<action>
	<ignore></ignore>
</action>
		</pluginExecution>
	</pluginExecutions>
</lifecycleMappingMetadata>
		</configuration>
	</plugin>
</plugins>
</pluginManagement>

Just save the project and error should be gone, if not you might need to Update the project from maven options.

Comments

  1. Ankush Tehale says:

    Thank you for posting.

  2. Tung says:

    Nice, thank you so much.

Leave a Reply

Your email address will not be published. Required fields are marked *

close
Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages