eu.lindenbaum.maven
Class PrepareReleaseMojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by 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:

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

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
PrepareReleaseMojo()
           
 
Method Summary
 void execute()
           
 
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
 

Constructor Detail

PrepareReleaseMojo

public PrepareReleaseMojo()
Method Detail

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.