org.apache.maven.continuum.release
Class DefaultContinuumReleaseManager

java.lang.Object
  extended by org.apache.maven.continuum.release.DefaultContinuumReleaseManager
All Implemented Interfaces:
ContinuumReleaseManager, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

public class DefaultContinuumReleaseManager
extends Object
implements ContinuumReleaseManager, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

Version:
$Id: DefaultContinuumReleaseManager.java 1392719 2012-10-02 03:17:07Z brett $
Author:
Jason van Zyl, Edwin Punzalan

Field Summary
 
Fields inherited from interface org.apache.maven.continuum.release.ContinuumReleaseManager
ROLE
 
Constructor Summary
DefaultContinuumReleaseManager()
           
 
Method Summary
 void contextualize(org.codehaus.plexus.context.Context context)
           
 ReleaseListenerSummary getListener(String releaseId)
           
 Map<String,ContinuumReleaseManagerListener> getListeners()
           
 org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor getPerformReleaseTaskQueueExecutor()
          Retrieve the Release TaskQueueExecutor instance
 Map<String,org.apache.maven.shared.release.config.ReleaseDescriptor> getPreparedReleases()
           
 Map<String,String> getPreparedReleasesForProject(String groupId, String artifactId)
           
 org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor getPrepareReleaseTaskQueueExecutor()
          Retrieve the PrepareRelease TaskQueueExecutor instance
 Map getReleaseResults()
           
 org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor getRollbackReleaseTaskQueueExecutor()
          Retrieve the RollbackRelease TaskQueueExecutor instance
 boolean isExecutingRelease()
          Determines if there is an ongoing release
 void perform(String releaseId, File buildDirectory, String goals, String arguments, boolean useReleaseProfile, ContinuumReleaseManagerListener listener)
          Perform a release based on a given releaseId
 void perform(String releaseId, File buildDirectory, String goals, String arguments, boolean useReleaseProfile, ContinuumReleaseManagerListener listener, LocalRepository repository)
          FIXME use a bean to replace such very huge parameter number (ContinuumReleaseRequest)
 void perform(String releaseId, String workingDirectory, File buildDirectory, String goals, String arguments, boolean useReleaseProfile, ContinuumReleaseManagerListener listener)
          Perform a release based on a release descriptor received by the Maven Release Plugin.
 String prepare(Project project, Properties releaseProperties, Map<String,String> relVersions, Map<String,String> devVersions, ContinuumReleaseManagerListener listener, String workingDirectory)
          Prepare a project for release
 String prepare(Project project, Properties releaseProperties, Map<String,String> relVersions, Map<String,String> devVersions, ContinuumReleaseManagerListener listener, String workingDirectory, Map<String,String> environments, String executable)
          Prepare a project for release
 void rollback(String releaseId, String workingDirectory, ContinuumReleaseManagerListener listener)
          Rollback changes made by a previous release.
 String sanitizeTagName(String scmUrl, String tagName)
          Clean up the tagname to respect the scm provider policy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContinuumReleaseManager

public DefaultContinuumReleaseManager()
Method Detail

prepare

public String prepare(Project project,
                      Properties releaseProperties,
                      Map<String,String> relVersions,
                      Map<String,String> devVersions,
                      ContinuumReleaseManagerListener listener,
                      String workingDirectory)
               throws ContinuumReleaseException
Description copied from interface: ContinuumReleaseManager
Prepare a project for release

Specified by:
prepare in interface ContinuumReleaseManager
Returns:
Throws:
ContinuumReleaseException

prepare

public String prepare(Project project,
                      Properties releaseProperties,
                      Map<String,String> relVersions,
                      Map<String,String> devVersions,
                      ContinuumReleaseManagerListener listener,
                      String workingDirectory,
                      Map<String,String> environments,
                      String executable)
               throws ContinuumReleaseException
Description copied from interface: ContinuumReleaseManager
Prepare a project for release

Specified by:
prepare in interface ContinuumReleaseManager
Returns:
Throws:
ContinuumReleaseException

perform

public void perform(String releaseId,
                    File buildDirectory,
                    String goals,
                    String arguments,
                    boolean useReleaseProfile,
                    ContinuumReleaseManagerListener listener)
             throws ContinuumReleaseException
Description copied from interface: ContinuumReleaseManager
Perform a release based on a given releaseId

Specified by:
perform in interface ContinuumReleaseManager
Throws:
ContinuumReleaseException

perform

public void perform(String releaseId,
                    File buildDirectory,
                    String goals,
                    String arguments,
                    boolean useReleaseProfile,
                    ContinuumReleaseManagerListener listener,
                    LocalRepository repository)
             throws ContinuumReleaseException
Description copied from interface: ContinuumReleaseManager
FIXME use a bean to replace such very huge parameter number (ContinuumReleaseRequest)

Specified by:
perform in interface ContinuumReleaseManager
Throws:
ContinuumReleaseException

perform

public void perform(String releaseId,
                    String workingDirectory,
                    File buildDirectory,
                    String goals,
                    String arguments,
                    boolean useReleaseProfile,
                    ContinuumReleaseManagerListener listener)
             throws ContinuumReleaseException
Description copied from interface: ContinuumReleaseManager
Perform a release based on a release descriptor received by the Maven Release Plugin.

Specified by:
perform in interface ContinuumReleaseManager
Throws:
ContinuumReleaseException

rollback

public void rollback(String releaseId,
                     String workingDirectory,
                     ContinuumReleaseManagerListener listener)
              throws ContinuumReleaseException
Description copied from interface: ContinuumReleaseManager
Rollback changes made by a previous release.

Specified by:
rollback in interface ContinuumReleaseManager
Throws:
ContinuumReleaseException

getPreparedReleases

public Map<String,org.apache.maven.shared.release.config.ReleaseDescriptor> getPreparedReleases()
Specified by:
getPreparedReleases in interface ContinuumReleaseManager

getPreparedReleasesForProject

public Map<String,String> getPreparedReleasesForProject(String groupId,
                                                        String artifactId)
Specified by:
getPreparedReleasesForProject in interface ContinuumReleaseManager

getReleaseResults

public Map getReleaseResults()
Specified by:
getReleaseResults in interface ContinuumReleaseManager

getListeners

public Map<String,ContinuumReleaseManagerListener> getListeners()
Specified by:
getListeners in interface ContinuumReleaseManager

sanitizeTagName

public String sanitizeTagName(String scmUrl,
                              String tagName)
                       throws Exception
Description copied from interface: ContinuumReleaseManager
Clean up the tagname to respect the scm provider policy.

Specified by:
sanitizeTagName in interface ContinuumReleaseManager
Parameters:
scmUrl - The scm url
tagName - The tag name
Returns:
The cleaned tag name
Throws:
Exception

getListener

public ReleaseListenerSummary getListener(String releaseId)
Specified by:
getListener in interface ContinuumReleaseManager
Returns:

isExecutingRelease

public boolean isExecutingRelease()
                           throws Exception
Description copied from interface: ContinuumReleaseManager
Determines if there is an ongoing release

Specified by:
isExecutingRelease in interface ContinuumReleaseManager
Returns:
true if there is an ongoing release; false otherwise
Throws:
Exception - if unable to determine if release is ongoing

getPerformReleaseTaskQueueExecutor

public org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor getPerformReleaseTaskQueueExecutor()
                                                                                             throws TaskQueueManagerException
Description copied from interface: ContinuumReleaseManager
Retrieve the Release TaskQueueExecutor instance

Specified by:
getPerformReleaseTaskQueueExecutor in interface ContinuumReleaseManager
Returns:
Release TaskQueueExecutor instance
Throws:
TaskQueueManagerException - if unable to retrieve the Release TaskQueueExecutor instance

getPrepareReleaseTaskQueueExecutor

public org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor getPrepareReleaseTaskQueueExecutor()
                                                                                             throws TaskQueueManagerException
Description copied from interface: ContinuumReleaseManager
Retrieve the PrepareRelease TaskQueueExecutor instance

Specified by:
getPrepareReleaseTaskQueueExecutor in interface ContinuumReleaseManager
Returns:
PrepareRelease TaskQueueExecutor instance
Throws:
TaskQueueManagerException - if unable to retrieve the PrepareRelease TaskQueueExecutor instance

getRollbackReleaseTaskQueueExecutor

public org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor getRollbackReleaseTaskQueueExecutor()
                                                                                              throws TaskQueueManagerException
Description copied from interface: ContinuumReleaseManager
Retrieve the RollbackRelease TaskQueueExecutor instance

Specified by:
getRollbackReleaseTaskQueueExecutor in interface ContinuumReleaseManager
Returns:
RollbackRelease TaskQueueExecutor instance
Throws:
TaskQueueManagerException - if unable to retrieve the RollbackRelease TaskQueueExecutor instance

contextualize

public void contextualize(org.codehaus.plexus.context.Context context)
                   throws org.codehaus.plexus.context.ContextException
Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.