Class GitScmProviderRepository
- java.lang.Object
- 
- org.apache.maven.scm.provider.ScmProviderRepository
- 
- org.apache.maven.scm.provider.ScmProviderRepositoryWithHost
- 
- org.apache.maven.scm.provider.git.repository.GitScmProviderRepository
 
 
 
- 
 public class GitScmProviderRepository extends ScmProviderRepositoryWithHost - Author:
- Emmanuel Venisse, Mark Struberg
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringPROTOCOL_FILEUse local file as transport.static StringPROTOCOL_GITUse gits internal protocol.static StringPROTOCOL_HTTPUse the standard port 80 http protocol.static StringPROTOCOL_HTTPSUse the standard port 443 https protocol.static StringPROTOCOL_NONENo special protocol specified.static StringPROTOCOL_RSYNCUse rsync for retrieving the data TODO implement!static StringPROTOCOL_SEPARATORThis trails every protocol.static StringPROTOCOL_SSHUse secure shell protocol.static StringURL_DELIMITER_FETCHSequence used to delimit the fetch URL.static StringURL_DELIMITER_PUSHSequence used to delimit the push URL.
 - 
Constructor SummaryConstructors Constructor Description GitScmProviderRepository(String url)GitScmProviderRepository(String url, String user, String password)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description RepositoryUrlgetFetchInfo()StringgetFetchUrl()StringgetFetchUrlWithMaskedPassword()StringgetProvider()RepositoryUrlgetPushInfo()StringgetPushUrl()StringgetPushUrlWithMaskedPassword()StringgetRelativePath(ScmProviderRepository ancestor)Get the relative path between the repository provided as argument and the current repository.StringtoString()- 
Methods inherited from class org.apache.maven.scm.provider.ScmProviderRepositoryWithHostgetHost, getPassphrase, getPort, getPrivateKey, setHost, setPassphrase, setPort, setPrivateKey
 - 
Methods inherited from class org.apache.maven.scm.provider.ScmProviderRepositorygetParent, getPassword, getUser, getWorkItem, isPersistCheckout, isPushChanges, setPassword, setPersistCheckout, setPushChanges, setUser, setWorkItem
 
- 
 
- 
- 
- 
Field Detail- 
URL_DELIMITER_FETCHpublic static final String URL_DELIMITER_FETCH Sequence used to delimit the fetch URL.- See Also:
- Constant Field Values
 
 - 
URL_DELIMITER_PUSHpublic static final String URL_DELIMITER_PUSH Sequence used to delimit the push URL.- See Also:
- Constant Field Values
 
 - 
PROTOCOL_SEPARATORpublic static final String PROTOCOL_SEPARATOR This trails every protocol.- See Also:
- Constant Field Values
 
 - 
PROTOCOL_FILEpublic static final String PROTOCOL_FILE Use local file as transport.- See Also:
- Constant Field Values
 
 - 
PROTOCOL_GITpublic static final String PROTOCOL_GIT Use gits internal protocol.- See Also:
- Constant Field Values
 
 - 
PROTOCOL_SSHpublic static final String PROTOCOL_SSH Use secure shell protocol.- See Also:
- Constant Field Values
 
 - 
PROTOCOL_HTTPpublic static final String PROTOCOL_HTTP Use the standard port 80 http protocol.- See Also:
- Constant Field Values
 
 - 
PROTOCOL_HTTPSpublic static final String PROTOCOL_HTTPS Use the standard port 443 https protocol.- See Also:
- Constant Field Values
 
 - 
PROTOCOL_RSYNCpublic static final String PROTOCOL_RSYNC Use rsync for retrieving the data TODO implement!- See Also:
- Constant Field Values
 
 - 
PROTOCOL_NONEpublic static final String PROTOCOL_NONE No special protocol specified. Git will either use git:// or ssh:// depending on whether we work locally or over the network.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
GitScmProviderRepositorypublic GitScmProviderRepository(String url) throws ScmException - Throws:
- ScmException
 
 - 
GitScmProviderRepositorypublic GitScmProviderRepository(String url, String user, String password) throws ScmException - Throws:
- ScmException
 
 
- 
 - 
Method Detail- 
getProviderpublic String getProvider() - Returns:
- either 'git' or 'jgit' depending on the underlying implementation being used
 
 - 
getFetchInfopublic RepositoryUrl getFetchInfo() 
 - 
getPushInfopublic RepositoryUrl getPushInfo() 
 - 
getFetchUrlpublic String getFetchUrl() - Returns:
- the URL used to fetch from the upstream repository
 
 - 
getFetchUrlWithMaskedPasswordpublic String getFetchUrlWithMaskedPassword() - Returns:
- the URL to fetch from with masked password used for logging purposes only
 
 - 
getPushUrlpublic String getPushUrl() - Returns:
- the URL used to push to the upstream repository
 
 - 
getPushUrlWithMaskedPasswordpublic String getPushUrlWithMaskedPassword() - Returns:
- the URL to push to with masked password used for logging purposes only
 
 - 
getRelativePathpublic String getRelativePath(ScmProviderRepository ancestor) Get the relative path between the repository provided as argument and the current repository.- Overrides:
- getRelativePathin class- ScmProviderRepository
- Parameters:
- ancestor- another repository that should be ancestor of this one
- Returns:
- the relative path or nullif it can't be resolved
 
 
- 
 
-