org.apache.maven.shared.release.scm
Interface ScmTranslator

All Known Implementing Classes:
ClearCaseScmTranslator, CvsScmTranslator, GitScmTranslator, HgScmTranslator, JazzScmTranslator, SubversionScmTranslator

public interface ScmTranslator

Translate the SCM information after tagging/reverting to trunk.

Author:
Brett Porter

Field Summary
static String ROLE
          Plexus Role.
 
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.
 

Field Detail

ROLE

static final String ROLE
Plexus Role.

Method Detail

translateBranchUrl

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

Parameters:
url - the source URL
branchName - the branch name
branchBase - the branch base for providers that support it
Returns:
the replacement URL

translateTagUrl

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

Parameters:
url - the source URL
tag - the tag
tagBase - the tag base for providers that support it
Returns:
the replacement URL

resolveTag

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

Parameters:
tag - the new tag
Returns:
the tag to use, or null if the provider does not use tags

toRelativePath

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

Parameters:
path -
Returns:
the relative path with OS specific File separator
Since:
2.3.1


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