Example of creating single zip distributive from Maven multi-module project.
Parent module\
|- plain directory with some-files (sql)
|- java module-1 (jar)
|- java module-2 (jar)
\- module for distributive (final zip-package)
Base build configuration described in POM file:
module-for-package/pom.xml
Required distributive content described in assembly configuration xml:
module-for-package/src/main/resources/package.xml
Simply call Maven goals:
mvn clean package
You will see result of assembly here:
module-for-package/target/{name}_{version}.zip
Maven does it something like this:
- package module-1 and module-2;
- read assembly plugin configuration;
- copy module-1 and module-2 in distributive module (module-for-package);
- copy required files (some-files) to distributive's module;
- archive 4 and 5 steps result into zip.