POM文件报错maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e.,
则查看<build>中的<plugin>中是否有
<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>[1.0.0,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
如果没有,则直接在<build>里的已有的<plugins>前面加上
<pluginManagement>
<plugins>
<!-- Ignore/Execute plugin execution -->
<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>[1.0.0,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
另外要保证后面的<plugins>中有
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive>
</configuration>
</execution>
</executions>
</plugin>
存在;
若已经有了
<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>[1.0.0,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
<goal>unpack</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
则将其删掉,按照前面没有的方式做一边,然后用Maven update project即可。
相关推荐
maven-dependency-plugin-2.8.jar
Maven依赖插件(maven-dependency-plugin)是Maven生态系统中的一个重要组成部分,它提供了多种目标(goals),如"copy-dependencies"和"unpack",帮助开发者在处理项目依赖时进行更精细的操作。 标题提到的问题...
在实际应用中,开发者可能需要配置Maven的pom.xml文件,声明maven-dependency-plugin和maven-cobertura-plugin,并设置相应的执行目标和参数。例如,可以使用`dependency:copy-dependencies`目标来复制项目依赖,或...
maven-dependency-plugin-2.1.jar
maven-dependency-versions-check-plugin-2.0.2-sources.jar
exec-maven-plugin是Maven生态系统中的一个插件,它允许用户在Maven构建过程中执行外部命令或脚本。这使得Maven项目可以集成更多的自定义操作,比如运行特定的脚本、调用系统命令等。本文将详细介绍exec-maven-...
maven-dependencygraph-plugin-0.0.4.jar
本项目是基于Java的smart-doc-maven-plugin官方maven插件设计源码,包含43个文件,其中包括27个Java源文件、7个Markdown文档、2个JSON文件、1个gitignore文件、1个LICENSE文件、1个NOTICE文件、1个PNG图片...-maven...
maven-dependencygraph-plugin-0.0.3.jar
maven-dependencygraph-plugin-0.0.2.jar
maven-dependencygraph-plugin-0.0.1.jar
maven-dependencygraph-plugin-0.0.4-sources.jar
maven-dependencygraph-plugin-0.0.3-sources.jar
maven-dependencygraph-plugin-0.0.2-sources.jar
maven-dependencygraph-plugin-0.0.1-sources.jar
Maven 使用 tomcat8-maven-plugin 插件 Maven 是一个流行的构建自动化工具,它可以帮助开发者自动完成项目的编译、测试、打包、部署等任务。 Tomcat 是一个流行的 Web 服务器,Maven 提供了一个插件 tomcat8-maven-...
maven-dependency-plugin-2.1.jar maven-dependency-tree-1.0.jar maven-deploy-plugin-2.7.jar maven-deploy-plugin-2.8.1.jar maven-eclipse-plugin-2.9.jar maven-embedder-3.2.1-sources.jar maven-filtering-...
maven-deploy-plugin-2.8.2.jar
maven-dependency-tree-1.2.jar
maven-jar-plugin-3.1.1.jar