Maven UberDist Plugin

Plugin Overview and Documentation map

Why another distribution plugin?

Some software systems are made of many artifacts and may require an aggregation of many "external" components or third parties to have a complete distribution.

In a production environment, deployment rules may be very strict and software teams may have to follow those strict prescribe procedures on how and where their system should be installed, especially on a Unix environments where proper file rights attribution are crucial to the whole server's security.

This work environment being very specific in nature, the one-fits-all rule doesn't apply and building the distribution could becomes an complex task in itself.

The goal of the UberDist plugin is to integrate the basic mechanism of having a custom goal called to build this specific complex distribution. But, it also automates some recurring tasks and most of all leverages the enormous amout of available facilities provided by the Maven build environment to give better control on the deployment file structure.

Goals Document listing all callable and internal goals of the UberDist maven plugin.
Tags The UberDist plugin defines Jelly tags to perform some basic operations. These tags are listed and explained in this document.
Properties The behavior of the Maven UberDist Plugin can be altered as many plugins via several properties. This document describes each property available, and the default values used if none are supplied in the project.
FAQs Question and answers to get you up and running in no time!

UberDist Process

UberDist, like all plugins, works with the results of a maven project compilation but not from the bare results from the target directory. The plugin uses 2 directories that are defined by properties:

When one of the distribution building goal is called (either one of uber-dist:make, build or prepare-dist-filesystem), the plugin will call some internal initialization goal, then try to call a custom goal supplied in your project to build the distribution files. This is where Uberdist is different from to the original dist plugin. When the time comes to copy all necessary files in the distribution assembly, instead of copying the project artifact (which may even be missing for 'non-standard' maven projects, UberDist will call YOUR custom distribution goal. To do this, it uses the artifactId of your project appended with ':prepare-dist-filesystem'.

Ex.: For a a maven project with id: myproject, the goal myproject:prepare-dist-filesystem will be called.

When this custom goal is missing, Uberdist will fall back to the original dist plugin calling its binary distribution construction goal.

If you did supply your 'uberdist custom goal' the plugin will then call some utility goals to perform common operations when preparing a distribution. These are supplied to help you building your distribution with minimum jelly code added in your project.

Uberdist offers those goals:

  1. uber-dist:copy-deps : to copy project dependencies like artifact does but with a little more control
  2. uber-dist:copy-scripts : to copy launch scripts (batch file, bash,etc) with token filtering
  3. uber-dist:make-executable : For Unix platforms, to make some files executable
And final step, creating the tarball (Unix) or the zip file (Windows).

For more details, please see the Goals, Properties and FAQ pages.

Happy Distributing!