maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e

Naftuli Kay

I have a fairly simple Maven project:

<project>
    <dependencies>
        ...
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
                        </configuration>    
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

However, I get the following error in m2eclipse:

Description Resource    Path    Location    Type
maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e. pom.xml  /jasperreports-test line 60 Maven Project Build Lifecycle Mapping Problem

Why do I care if m2eclipse doesn't "support" this task? Maven does, and that's all I really care about. How can I get this error in my project to go away?

maksimov

It seems to be a known issue. You can instruct m2e to ignore this.

Option 1: pom.xml

Add the following inside your <build/> tag:

<pluginManagement>
<plugins>
    <!-- Ignore/Execute plugin execution -->
    <plugin>
        <groupId>org.eclipse.m2e</groupId>
        <artifactId>lifecycle-mapping</artifactId>
        <version>1.0.0</version>
        <configuration>
            <lifecycleMappingMetadata>
                <pluginExecutions>
                    <!-- copy-dependency plugin -->
                    <pluginExecution>
                        <pluginExecutionFilter>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-dependency-plugin</artifactId>
                            <versionRange>[1.0.0,)</versionRange>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                        </pluginExecutionFilter>
                        <action>
                            <ignore />
                        </action>
                    </pluginExecution>
                </pluginExecutions>
            </lifecycleMappingMetadata>
        </configuration>
    </plugin>
   </plugins></pluginManagement>

You will need to do Maven... -> Update Project Configuration on your project after this.

Read more: http://wiki.eclipse.org/M2E_plugin_execution_not_covered#m2e_maven_plugin_coverage_status

Option 2: Global Eclipse Override

To avoid changing your POM files, the ignore override can be applied to the whole workspace via Eclipse settings.

Save this file somewhere on the disk: https://gist.github.com/maksimov/8906462

In Eclipse/Preferences/Maven/Lifecycle Mappings browse to this file and click OK:

Eclipse Settings

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Maven maven-dependency-plugin copy-dependencies ignores outputDirectory

From Dev

Maven unpack-dependencies of a plugin dependency

From Dev

maven-dependency-plugin:unpack Error

From Dev

maven dependency:copy-dependencies is renaming incorrectly a .so dependency

From Dev

Maven-dependency-plugin (unpack-dependencies) ignores configuration

From Dev

maven-dependency-plugin:unpack ignores type configuration

From Dev

How to unpack just the files from a sub-folder in maven-dependency-plugin with goal unpack-dependencies?

From Dev

M2E Connector for kie-maven-plugin?

From Java

m2e: Generated code with exec-maven-plugin

From Dev

No plugin goals bound to a maven phase

From Dev

Copy dependencies with maven

From Dev

How do I know which goals of a maven plugin are report goals?

From Java

Maven JAXB2 XJC plugin: M2E plugin execution not covered

From Dev

Spring boot maven plugin : goals and phase

From Dev

Not able to bind plugin goals to maven lifecycle phases

From Dev

Confusion on Spring Boot Maven plugin goals

From Dev

maven exclude plugin in dependency

From Dev

Maven resources plugin dependency

From Dev

Maven PlugIn Dependency Exception

From Java

How to configure toolchains plugin in m2e / Installed maven in Eclipse

From Java

Can I execute maven plugin whith Eclipse m2e UPDATE?

From Dev

Avro Maven Plugin: Type not supported

From Dev

How do I open a Java project (that uses maven) in Eclipse? (Do I use M2E or maven-eclipse-plugin)

From Dev

maven dependency plugin ignores dependency versions?

From Dev

How do plugin goals tie into build phases in maven

From Dev

Executing individual maven plugin goals in multi-module project

From Dev

Maven Plugin Dependency : class not found

From Dev

How to show dependency of a plugin in Maven?

From Dev

How to scan maven plugin dependency?

Related Related

  1. 1

    Maven maven-dependency-plugin copy-dependencies ignores outputDirectory

  2. 2

    Maven unpack-dependencies of a plugin dependency

  3. 3

    maven-dependency-plugin:unpack Error

  4. 4

    maven dependency:copy-dependencies is renaming incorrectly a .so dependency

  5. 5

    Maven-dependency-plugin (unpack-dependencies) ignores configuration

  6. 6

    maven-dependency-plugin:unpack ignores type configuration

  7. 7

    How to unpack just the files from a sub-folder in maven-dependency-plugin with goal unpack-dependencies?

  8. 8

    M2E Connector for kie-maven-plugin?

  9. 9

    m2e: Generated code with exec-maven-plugin

  10. 10

    No plugin goals bound to a maven phase

  11. 11

    Copy dependencies with maven

  12. 12

    How do I know which goals of a maven plugin are report goals?

  13. 13

    Maven JAXB2 XJC plugin: M2E plugin execution not covered

  14. 14

    Spring boot maven plugin : goals and phase

  15. 15

    Not able to bind plugin goals to maven lifecycle phases

  16. 16

    Confusion on Spring Boot Maven plugin goals

  17. 17

    maven exclude plugin in dependency

  18. 18

    Maven resources plugin dependency

  19. 19

    Maven PlugIn Dependency Exception

  20. 20

    How to configure toolchains plugin in m2e / Installed maven in Eclipse

  21. 21

    Can I execute maven plugin whith Eclipse m2e UPDATE?

  22. 22

    Avro Maven Plugin: Type not supported

  23. 23

    How do I open a Java project (that uses maven) in Eclipse? (Do I use M2E or maven-eclipse-plugin)

  24. 24

    maven dependency plugin ignores dependency versions?

  25. 25

    How do plugin goals tie into build phases in maven

  26. 26

    Executing individual maven plugin goals in multi-module project

  27. 27

    Maven Plugin Dependency : class not found

  28. 28

    How to show dependency of a plugin in Maven?

  29. 29

    How to scan maven plugin dependency?

HotTag

Archive