我正在使用maven依赖插件来解压缩内部tar文件。我用mvn generate-resources
运行命令但是它解压缩了所有资源,而我真正关心的只是我自己的资源。我没有多少使用maven,但有一种方法可以解压缩我的一个资源,以便节省执行时间
我的插件就是这样配置的
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>build-tools</id>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<artifactItems>
<artifactItem>
<includeTypes>tar.gz</includeTypes>
<type>tar.gz</type>
<outputDirectory>${project.build.directory}</outputDirectory>
<includeArtifactIds>build-tools</includeArtifactIds>
<includeGroupIds>com.foo.build</includeGroupIds>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>