解决maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported

阅读更多

解决办法:在plugins之前添加如下pluginManagement,二者前后顺序如下:

 

[html]  view plain copy
 
  1. <build>  
  2.         <pluginManagement>  
  3.             <plugins>  
  4.                 <plugin>  
  5.                     <groupId>org.eclipse.m2egroupId>  
  6.                     <artifactId>lifecycle-mappingartifactId>  
  7.                     <version>1.0.0version>  
  8.                     <configuration>  
  9.                         <lifecycleMappingMetadata>  
  10.                             <pluginExecutions>  
  11.                                 <pluginExecution>  
  12.                                     <pluginExecutionFilter>  
  13.                                         <groupId>org.apache.maven.pluginsgroupId>  
  14.                                         <artifactId>maven-dependency-pluginartifactId>  
  15.                                         <versionRange>[2.0,)versionRange>  
  16.                                         <goals>  
  17.                                             <goal>copy-dependenciesgoal>  
  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.pluginsgroupId>  
  33.                 <artifactId>maven-dependency-pluginartifactId>  
  34.                 <executions>  
  35.                     <execution>  
  36.                         <id>copy-dependenciesid>  
  37.                         <phase>packagephase>  
  38.                         <goals>  
  39.                             <goal>copy-dependenciesgoal>  
  40.                         goals>  
  41.                         <configuration>  
  42.                             <outputDirectory>${project.build.directory}/liboutputDirectory>  
  43.                             <excludeTransitive>falseexcludeTransitive>  
  44.                             <stripVersion>truestripVersion>  
  45.                         configuration>  
  46.                     execution>  
  47.                 executions>  
  48.             plugin>  
  49.         plugins>  
  50.     build> 

你可能感兴趣的:(解决maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported)