解压项目依赖
这与复制直接依赖项示例非常相似。不同之处在于直接依赖被解包,包括传递依赖。要解压工件,请使用dependency:unpack-dependencies
mojo 并将依赖插件配置为类似于以下示例的内容:
<project> [...] <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>3.3.0</version> <executions> <execution> <id>unpack-dependencies</id> <phase>package</phase> <goals> <goal>unpack-dependencies</goal> </goals> <configuration> <includes>**/*.class</includes> <excludes>**/*.properties</excludes> <outputDirectory>${project.build.directory}/alternateLocation</outputDirectory> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> </configuration> </execution> </executions> </plugin> </plugins> </build> [...] </project>