Maven has a plugin for working with Ant. Using this plugin, you can create Ant-Tasks, these tasks are a sequence of xml instructions that you can use (almost) everything you need.
Part of the code you can use as inspiration:
<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>
source: https://ant.apache.org/manual/Tasks/unzip.html
source share