erlang:package

Full name:

eu.lindenbaum:maven-erlang-plugin:1.0.0-beta:package

Description:

This Mojo packages all application artifacts into a single .tar.gz package. This includes .beam files, the .hrl include files, SNMP resources, private data from the priv and resources directories and non-erlang sources.

Besides that this Mojo also copies the erlang application resource file. 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 .app file. This can be done by using one of the supported variables into the application resource files. Below is a list of supported variables and their substitutions:

  • ${ARTIFACT}: the projects artifact id (atom)
  • ${DESCRIPTION}: the projects description (string)
  • ${ID}: the projects id (string)
  • ${VERSION}: the projects version (string)
  • ${MODULES}: all compiled .beam files found in the target ebin folder (list)
  • ${REGISTERED}: all registered names, based on the -registered(Names). attribute retrieved from the compiled .beam files (list)

In case there is no application resouce file specified the Mojo will generate a default .app file which looks like this:

{application, ${ARTIFACT},
  [{description, ${DESCRIPTION}},
   {id, ${ID}},
   {vsn, ${VERSION}},
   {modules, ${MODULES}},
   {maxT, infinity},
   {registered, ${REGISTERED}},
   {included_applications, []},
   {applications, []},
   {env, []},
   {mod, undefined},
   {start_phases, []}]}.

The resulting application resource file as well as the application upgrade file will be checked for plausability regardless if generated or not. This is done by checking the application version against the project version, checking the application modules against the found compiled modules as well as checking the application's start module.

Attributes:

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

Optional Parameters

Name Type Since Description
failOnUndeclaredModules boolean - Setting this to true will break the build when the application file does not contain all found modules.
Default value is: true.
removeTempDir boolean - Whether to delete the temporary packaging dir or not. Generally useful for debugging. Setting this to false will preserve the temp dir.
Default value is: true.

Parameter Details

failOnUndeclaredModules:

Setting this to true will break the build when the application file does not contain all found modules.
  • Type: boolean
  • Required: No
  • Default: true

removeTempDir:

Whether to delete the temporary packaging dir or not. Generally useful for debugging. Setting this to false will preserve the temp dir.
  • Type: boolean
  • Required: No
  • Default: true