Skip to content

๐ŸŠ Example of creating single zip distributive from Maven multi-module project.

Notifications You must be signed in to change notification settings

VladimirFrank/Maven-Assembly-Multimodule-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1 Commit
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Apache Maven Assembly plugin for multi-module

Example of creating single zip distributive from Maven multi-module project.

Project structure

Parent module\
             |- plain directory with some-files (sql)
             |- java module-1 (jar)
             |- java module-2 (jar)
             \- module for distributive (final zip-package)

Plugin configuration

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

Usage

Simply call Maven goals:

mvn clean package

You will see result of assembly here:

module-for-package/target/{name}_{version}.zip

Execution steps

Maven does it something like this:

  1. package module-1 and module-2;
  2. read assembly plugin configuration;
  3. copy module-1 and module-2 in distributive module (module-for-package);
  4. copy required files (some-files) to distributive's module;
  5. archive 4 and 5 steps result into zip.

About

๐ŸŠ Example of creating single zip distributive from Maven multi-module project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages