org.apache.maven.shared.release.scm
Class DefaultScmRepositoryConfigurator

java.lang.Object
  extended by org.codehaus.plexus.logging.AbstractLogEnabled
      extended by org.apache.maven.shared.release.scm.DefaultScmRepositoryConfigurator
All Implemented Interfaces:
ScmRepositoryConfigurator, org.codehaus.plexus.logging.LogEnabled

public class DefaultScmRepositoryConfigurator
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements ScmRepositoryConfigurator

Tool that gets a configured SCM repository from release configuration.

Author:
Brett Porter
Plexus component:
role:
"org.apache.maven.shared.release.scm.ScmRepositoryConfigurator"

Field Summary
 
Fields inherited from interface org.apache.maven.shared.release.scm.ScmRepositoryConfigurator
ROLE
 
Constructor Summary
DefaultScmRepositoryConfigurator()
           
 
Method Summary
 ScmRepository getConfiguredRepository(ReleaseDescriptor releaseDescriptor, Settings settings)
          Construct a configured SCM repository from a release configuration.
 ScmRepository getConfiguredRepository(String url, ReleaseDescriptor releaseDescriptor, Settings settings)
          Construct a configured SCM repository from a release configuration with an overridden base SCM URL.
 ScmProvider getRepositoryProvider(ScmRepository repository)
          Get the SCM provider used for the given SCM repository.
 void setScmManager(ScmManager scmManager)
           
 
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
 

Constructor Detail

DefaultScmRepositoryConfigurator

public DefaultScmRepositoryConfigurator()
Method Detail

getConfiguredRepository

public ScmRepository getConfiguredRepository(ReleaseDescriptor releaseDescriptor,
                                             Settings settings)
                                      throws ScmRepositoryException,
                                             NoSuchScmProviderException
Description copied from interface: ScmRepositoryConfigurator
Construct a configured SCM repository from a release configuration.

Specified by:
getConfiguredRepository in interface ScmRepositoryConfigurator
Parameters:
releaseDescriptor - the configuration to insert into the repository
settings - the settings.xml configuraiton
Returns:
the repository created
Throws:
ScmRepositoryException - if it is not possible to create a suitable SCM repository
NoSuchScmProviderException - if the requested SCM provider is not available

getConfiguredRepository

public ScmRepository getConfiguredRepository(String url,
                                             ReleaseDescriptor releaseDescriptor,
                                             Settings settings)
                                      throws ScmRepositoryException,
                                             NoSuchScmProviderException
Description copied from interface: ScmRepositoryConfigurator
Construct a configured SCM repository from a release configuration with an overridden base SCM URL.

Specified by:
getConfiguredRepository in interface ScmRepositoryConfigurator
Parameters:
url - the SCM URL to use instead of the one from the release descriptor
releaseDescriptor - the configuration to insert into the repository
settings - the settings.xml configuraiton
Returns:
the repository created
Throws:
ScmRepositoryException - if it is not possible to create a suitable SCM repository
NoSuchScmProviderException - if the requested SCM provider is not available

getRepositoryProvider

public ScmProvider getRepositoryProvider(ScmRepository repository)
                                  throws NoSuchScmProviderException
Description copied from interface: ScmRepositoryConfigurator
Get the SCM provider used for the given SCM repository.

Specified by:
getRepositoryProvider in interface ScmRepositoryConfigurator
Parameters:
repository - the SCM repository
Returns:
the SCM provider
Throws:
NoSuchScmProviderException - if the requested SCM provider is not available

setScmManager

public void setScmManager(ScmManager scmManager)


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