m2e: copy-dependencies is not supported by m2e

泄露秘密 提交于 2019-12-03 15:45:40

From the error message above, it appears that you have tried the Run as -> Maven Build without specifying which maven goal to run.

You should try a specific maven goal - Run as -> Maven install or Run as -> Maven test. Alternately, you can provide a goal in the Maven Build configuration.

Now, as for the warning, copy-dependencies is not supported by m2e, it means that m2e does not support this plugin. Not all the maven functionality are currently supported by m2e.

This worked for me:

To resolve this error all you need to do is copy following code just before your closing tag of 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>

I have the same problem as yours

When you want to compile your Maven project using m2eclipse plugin, try

Run as -> Maven Build

then type compile in Goals

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!