org.apache.maven.shared.release.phase
Class AbstractScmCommitPhase

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.shared.release.phase.AbstractReleasePhase
          extended by org.apache.maven.shared.release.phase.AbstractScmCommitPhase
All Implemented Interfaces:
ReleasePhase, org.codehaus.plexus.logging.LogEnabled
Direct Known Subclasses:
ScmCommitDevelopmentPhase, ScmCommitPreparationPhase

public abstract class AbstractScmCommitPhase
extends AbstractReleasePhase

Holds the basic concept of committing changes to the current working copy.

Author:
Brett Porter, Lars Corneliussen

Field Summary
protected  boolean afterBranchOrTag
           
protected  boolean beforeBranchOrTag
           
protected  String messageFormat
          The format for the commit message.
protected  ScmRepositoryConfigurator scmRepositoryConfigurator
          Tool that gets a configured SCM repository from release configuration.
 
Fields inherited from interface org.apache.maven.shared.release.phase.ReleasePhase
ROLE
 
Constructor Summary
AbstractScmCommitPhase()
           
 
Method Summary
protected  String createMessage(ReleaseDescriptor releaseDescriptor)
           
protected static List<File> createPomFiles(ReleaseDescriptor releaseDescriptor, List<MavenProject> reactorProjects)
           
protected static List<File> createPomFiles(ReleaseDescriptor releaseDescriptor, MavenProject project)
           
 ReleaseResult execute(ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<MavenProject> reactorProjects)
          Execute the phase.
protected  void performCheckins(ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<MavenProject> reactorProjects, String message)
           
protected abstract  void runLogic(ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<MavenProject> reactorProjects, ReleaseResult result, boolean simulating)
           
 ReleaseResult simulate(ReleaseDescriptor releaseDescriptor, ReleaseEnvironment releaseEnvironment, List<MavenProject> reactorProjects)
          Simulate the phase, but don't make any changes to the project.
protected  void simulateCheckins(ReleaseDescriptor releaseDescriptor, List<MavenProject> reactorProjects, ReleaseResult result, String message)
           
protected  void validateConfiguration(ReleaseDescriptor releaseDescriptor)
           
 
Methods inherited from class org.apache.maven.shared.release.phase.AbstractReleasePhase
clean, execute, getReleaseResultSuccess, logDebug, logDebug, logError, logInfo, logWarn, simulate
 
Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

beforeBranchOrTag

protected boolean beforeBranchOrTag

afterBranchOrTag

protected boolean afterBranchOrTag

scmRepositoryConfigurator

protected ScmRepositoryConfigurator scmRepositoryConfigurator
Tool that gets a configured SCM repository from release configuration.


messageFormat

protected String messageFormat
The format for the commit message.

Constructor Detail

AbstractScmCommitPhase

public AbstractScmCommitPhase()
Method Detail

execute

public ReleaseResult execute(ReleaseDescriptor releaseDescriptor,
                             ReleaseEnvironment releaseEnvironment,
                             List<MavenProject> reactorProjects)
                      throws ReleaseExecutionException,
                             ReleaseFailureException
Description copied from interface: ReleasePhase
Execute the phase.

Parameters:
releaseDescriptor - the configuration to use
releaseEnvironment - the environmental configuration, such as Maven settings, Maven home, etc.
reactorProjects - the reactor projects
Returns:
the release result
Throws:
ReleaseExecutionException - an exception during the execution of the phase
ReleaseFailureException - a failure during the execution of the phase

simulate

public ReleaseResult simulate(ReleaseDescriptor releaseDescriptor,
                              ReleaseEnvironment releaseEnvironment,
                              List<MavenProject> reactorProjects)
                       throws ReleaseExecutionException,
                              ReleaseFailureException
Description copied from interface: ReleasePhase
Simulate the phase, but don't make any changes to the project.

Parameters:
releaseDescriptor - the configuration to use
releaseEnvironment - the environmental configuration, such as Maven settings, Maven home, etc.
reactorProjects - the reactor projects
Returns:
the release result
Throws:
ReleaseExecutionException - an exception during the execution of the phase
ReleaseFailureException - a failure during the execution of the phase

runLogic

protected abstract void runLogic(ReleaseDescriptor releaseDescriptor,
                                 ReleaseEnvironment releaseEnvironment,
                                 List<MavenProject> reactorProjects,
                                 ReleaseResult result,
                                 boolean simulating)
                          throws ReleaseScmCommandException,
                                 ReleaseExecutionException,
                                 ReleaseScmRepositoryException
Throws:
ReleaseScmCommandException
ReleaseExecutionException
ReleaseScmRepositoryException

performCheckins

protected void performCheckins(ReleaseDescriptor releaseDescriptor,
                               ReleaseEnvironment releaseEnvironment,
                               List<MavenProject> reactorProjects,
                               String message)
                        throws ReleaseScmRepositoryException,
                               ReleaseExecutionException,
                               ReleaseScmCommandException
Throws:
ReleaseScmRepositoryException
ReleaseExecutionException
ReleaseScmCommandException

simulateCheckins

protected void simulateCheckins(ReleaseDescriptor releaseDescriptor,
                                List<MavenProject> reactorProjects,
                                ReleaseResult result,
                                String message)

validateConfiguration

protected void validateConfiguration(ReleaseDescriptor releaseDescriptor)
                              throws ReleaseFailureException
Throws:
ReleaseFailureException

createMessage

protected String createMessage(ReleaseDescriptor releaseDescriptor)

createPomFiles

protected static List<File> createPomFiles(ReleaseDescriptor releaseDescriptor,
                                           MavenProject project)

createPomFiles

protected static List<File> createPomFiles(ReleaseDescriptor releaseDescriptor,
                                           List<MavenProject> reactorProjects)


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.