【发布时间】:2013-07-05 10:44:13
【问题描述】:
我在路径 "C:\ptc\Windchill_10.1\Windchill" 中有一个 zip 文件。请谁能告诉我如何使用 maven 解压缩此文件
【问题讨论】:
我在路径 "C:\ptc\Windchill_10.1\Windchill" 中有一个 zip 文件。请谁能告诉我如何使用 maven 解压缩此文件
【问题讨论】:
Maven 有一个插件可以与 Ant 一起工作。使用该插件,您可以创建 Ant-Tasks,这些任务是一系列 xml 指令,您可以使用(实际上)任何您需要的东西。
一段可以作为灵感的代码:
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>generate-resources</phase>
<configuration>
<tasks>
<echo message="unzipping file" />
<unzip src="output/inner.zip" dest="output/" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
【讨论】: