erlang:prepare-release

Full name:

eu.lindenbaum:maven-erlang-plugin:1.0.0-beta:prepare-release

Description:

This Mojo prepares the packaging of a release .tar.gz package by creating the release upgrade/downgrade scripts as well as the boot and start scripts. The scripts are created using the erlang systools modules make_relup and make_script functions.

The builds can be customized by passing user options through the scriptOptions and relupOptions parameters in the specific project pom. In order to manage the project over the project pom there is the possibility to let the Mojo automatically fill in values from the project pom into the .rel file. This can be done by using one of the supported variables into the release file. Below is a list of supported variables and their substitutions:

  • ${ARTIFACT}: the projects artifact id (atom)
  • ${VERSION}: the projects version (string)
  • ${APPLICATIONS}: a list of the project dependencies application and version tuples
  • ${APPLICATION_NAME}: will be replaced by a string representing the available application version on this host

In case there is no release file specified the Mojo will generate a default .rel file which looks like this:

{release,
  {${ARTIFACT}, ${VERSION}},
  {erts, ${ERTS}},
  [{kernel, ${KERNEL}}, 
   {stdlib, ${STDLIB}}] ++ ${APPLICATIONS}}.

The resulting release file will be checked for plausability regardless if generated or not. This is done by checking the release version against the project version and checking all dependency versions against the application versions in the release file.

In order to create the release downgrade/upgrade script the Mojo also needs a list of versions to upgrade from or to downgrade to. If the user chooses to not specify both lists the release script generation will be skipped.

TODO The generation of relup files has not yet been tested.

Attributes:

  • Requires a Maven 2.0 project to be executed.
  • Binds by default to the lifecycle phase: process-classes.

Optional Parameters

Name Type Since Description
previousVersions List - A List of version Strings to upgrade from when this release is installed.
relupOptions String[] - Additional options for systools:make_relup/4.
scriptOptions String[] - Additional options for systools:make_script/2.
subsequentVersions List - A List of version Strings to downgrade from when this release is installed.

Parameter Details

previousVersions:

A List of version Strings to upgrade from when this release is installed.
  • Type: java.util.List
  • Required: No

relupOptions:

Additional options for systools:make_relup/4.
  • Type: java.lang.String[]
  • Required: No

scriptOptions:

Additional options for systools:make_script/2.
  • Type: java.lang.String[]
  • Required: No

subsequentVersions:

A List of version Strings to downgrade from when this release is installed.
  • Type: java.util.List
  • Required: No