eu.lindenbaum.maven
Class PrepareReleaseMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
eu.lindenbaum.maven.PrepareReleaseMojo
- All Implemented Interfaces:
- org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
public final class PrepareReleaseMojo
- extends org.apache.maven.plugin.AbstractMojo
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.
- Author:
- Tobias Schlager
Fields inherited from interface org.apache.maven.plugin.Mojo |
ROLE |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PrepareReleaseMojo
public PrepareReleaseMojo()
execute
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
Copyright © 2010 Lindenbaum GmbH. All Rights Reserved.