Search code examples
javamavenmaven-assembly-plugin

How can we zip two separate directories in seperate zip files, using assembly plugin?


I have tried below with same assembly descriptor with two executions in pom.xml.

The problem is both zip files are mixing since they are calling one after other the same file.

Is there any way we can achieve this without going for two different assembly descriptor files?

File One File Two


Solution

  • If you're trying to create two different zip files from two different directories, you'll need two different assembly descriptors. Each descriptor describes which files go into the end result.