解决maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported
程序员文章站
2022-07-15 08:19:54
...
解决办法:在plugins之前添加如下pluginManagement,二者前后顺序如下:
- <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>[2.0,)</versionRange>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore />
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-dependencies</id>
- <phase>package</phase>
- <goals>
- <goal>copy-dependencies</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/lib</outputDirectory>
- <excludeTransitive>false</excludeTransitive>
- <stripVersion>true</stripVersion>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
上一篇: 解决maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported
下一篇: Thrift入门及Java实例演示
推荐阅读
-
解决maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported
-
解决maven-dependency-plugin (goals "copy-dependencies","unpack") is not supported
-
Maven maven-dependency-plugin (goals "copy-dependencies", "unpack") is not suppo
-
Maven maven-dependency-plugin (goals "copy-dependencies", "unpack") is not suppo