`
lan13217
  • 浏览: 495952 次
  • 性别: Icon_minigender_1
社区版块
存档分类
最新评论

maven-dependency-plugin (goals “copy-dependencies”, “unpack”) is not supported b

 
阅读更多

POM文件报错maven-dependency-plugin (goals "copy-dependencies", "unpack") is not supported by m2e., 
在</build>标签前添加如下内容 

Java代码  收藏代码
  1. <pluginManagement>  
  2.         <plugins>  
  3.         <!-- Ignore/Execute plugin execution -->  
  4.         <plugin>  
  5.             <groupId>org.eclipse.m2e</groupId>  
  6.             <artifactId>lifecycle-mapping</artifactId>  
  7.             <version>1.0.0</version>  
  8.             <configuration>  
  9.                 <lifecycleMappingMetadata>  
  10.                     <pluginExecutions>  
  11.                         <!-- copy-dependency plugin -->  
  12.                         <pluginExecution>  
  13.                             <pluginExecutionFilter>  
  14.                                 <groupId>org.apache.maven.plugins</groupId>  
  15.                                 <artifactId>maven-dependency-plugin</artifactId>  
  16.                                 <versionRange>[1.0.0,)</versionRange>  
  17.                                 <goals>  
  18.                                     <goal>copy-dependencies</goal>  
  19.                                 </goals>  
  20.                             </pluginExecutionFilter>  
  21.                             <action>  
  22.                                 <ignore />  
  23.                             </action>  
  24.                         </pluginExecution>  
  25.                     </pluginExecutions>  
  26.                 </lifecycleMappingMetadata>  
  27.             </configuration>  
  28.         </plugin>  
  29.        </plugins>  
  30.        </pluginManagement>  



maven2.0以上版本加入如下 

Java代码  收藏代码
  1. <pluginManagement>  
  2.             <plugins>  
  3.                 <plugin>  
  4.                     <groupId>org.eclipse.m2e</groupId>  
  5.                     <artifactId>lifecycle-mapping</artifactId>  
  6.                     <version>1.0.0</version>  
  7.                     <configuration>  
  8.                         <lifecycleMappingMetadata>  
  9.                             <pluginExecutions>  
  10.                                 <pluginExecution>  
  11.                                     <pluginExecutionFilter>  
  12.                                         <groupId>org.apache.maven.plugins</groupId>  
  13.                                         <artifactId>maven-dependency-plugin</artifactId>  
  14.                                         <versionRange>[2.0,)</versionRange>  
  15.                                         <goals>  
  16.                                             <goal>copy-dependencies</goal>  
  17.                                             <goal>unpack</goal>  
  18.                                         </goals>  
  19.                                     </pluginExecutionFilter>  
  20.                                     <action>  
  21.                                         <ignore />  
  22.                                     </action>  
  23.                                 </pluginExecution>  
  24.                             </pluginExecutions>  
  25.                         </lifecycleMappingMetadata>  
  26.                     </configuration>  
  27.                 </plugin>  
  28.             </plugins>  
  29.         </pluginManagement>  
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics