需求说明
在maven构建项目时候,构建完成后或者构建项目前先zip压缩或者zip解压某个文件。
插件引入
在maven项目的pom.xml文件中的build->plugins节点下添加以下插件依赖
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<!-- ...这里执行任务 -->
</executions>
</plugin>
配置插件执行ZIP解压任务
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<configuration>
<target>
<unzip scr="src/main/resources/xx.zip" dest="src/main/resources/xx" />
</target>
</configuration>
</executions>
</plugin>
配置插件执行ZIP压缩文件任务
https://www.syntaxspace.com/article/2504172027409188.html
评论