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

java.lang.Object
  extended by org.apache.maven.shared.release.scm.GitScmTranslator
All Implemented Interfaces:
ScmTranslator

public class GitScmTranslator
extends Object
implements ScmTranslator

Plexus component:
role:
"org.apache.maven.shared.release.scm.ScmTranslator"
role-hint:
"git"

Field Summary
 
Fields inherited from interface org.apache.maven.shared.release.scm.ScmTranslator
ROLE
 
Constructor Summary
GitScmTranslator()
           
 
Method Summary
 String resolveTag(String tag)
          Determine what tag should be added to the POM given the original tag and the new one.
 String toRelativePath(String path)
          Translates an ScmFile path to a path relative to the working directory.
 String translateBranchUrl(String url, String branchName, String branchBase)
          Take an URL and find the correct replacement URL for a given branch.
 String translateTagUrl(String url, String tag, String tagBase)
          Take an URL and find the correct replacement URL for a given tag.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GitScmTranslator

public GitScmTranslator()
Method Detail

translateBranchUrl

public String translateBranchUrl(String url,
                                 String branchName,
                                 String branchBase)
Take an URL and find the correct replacement URL for a given branch.

Specified by:
translateBranchUrl in interface ScmTranslator
Parameters:
url - the source URL
branchName - the branch name
branchBase - the branch base for providers that support it
Returns:
the replacement URL

translateTagUrl

public String translateTagUrl(String url,
                              String tag,
                              String tagBase)
Take an URL and find the correct replacement URL for a given tag.

Specified by:
translateTagUrl in interface ScmTranslator
Parameters:
url - the source URL
tag - the tag
tagBase - the tag base for providers that support it
Returns:
the replacement URL

resolveTag

public String resolveTag(String tag)
Determine what tag should be added to the POM given the original tag and the new one.

Specified by:
resolveTag in interface ScmTranslator
Parameters:
tag - the new tag
Returns:
the tag to use, or null if the provider does not use tags

toRelativePath

public String toRelativePath(String path)
Translates an ScmFile path to a path relative to the working directory.

Specified by:
toRelativePath in interface ScmTranslator
Returns:
the relative path with OS specific File separator


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