欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Maven maven-dependency-plugin (goals "copy-dependencies", "unpack") is not suppo

程序员文章站 2022-06-30 21:09:27
...

Maven 提示异常:

 

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

 

问题定位:Maven插件不同导致的不兼容。

 

解决方案:

 

在pom.xml中<build></build>中增加如下代码:

<pluginManagement>
<plugins>
  <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>
        </goals>
       </pluginExecutionFilter>
       <action>
        <ignore/>
       </action>
       </pluginExecution>
       </pluginExecutions>
      </lifecycleMappingMetadata>
     </configuration>
    </plugin>
   </plugins>
</pluginManagement>