解决m2e插件maven-dependency-plugin问题

http://blog.csdn.net/smst1987/article/details/6871495

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

解决方法:

 1 <build>
 2         <pluginManagement>
 3             <plugins>
 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                                 <pluginExecution>
12                                     <pluginExecutionFilter>
13                                         <groupId>org.apache.maven.plugins</groupId>
14                                         <artifactId>maven-dependency-plugin</artifactId>
15                                         <versionRange>[2.0,)</versionRange>
16                                         <goals>
17                                             <goal>copy-dependencies</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>
30         <plugins>
31             <plugin>
32                 <groupId>org.apache.maven.plugins</groupId>
33                 <artifactId>maven-dependency-plugin</artifactId>
34                 <executions>
35                     <execution>
36                         <id>copy-dependencies</id>
37                         <phase>package</phase>
38                         <goals>
39                             <goal>copy-dependencies</goal>
40                         </goals>
41                         <configuration>
42                             <outputDirectory>${project.build.directory}/lib</outputDirectory>
43                             <excludeTransitive>false</excludeTransitive>
44                             <stripVersion>true</stripVersion>
45                         </configuration>
46                     </execution>
47                 </executions>
48             </plugin>
49         </plugins>
50     </build>

 

posted @ 2014-04-10 16:40  悟寰轩-叶秋  阅读(2048)  评论(0编辑  收藏  举报