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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate RepositoryUrlThe URL used to fetch from the upstream repository.private static final Patternstatic final StringUse local file as transport.static final StringUse gits internal protocol.static final StringUse the standard port 80 http protocol.static final StringUse the standard port 443 https protocol.static final StringNo special protocol specified.static final StringUse rsync for retrieving the data TODO implement!static final StringThis trails every protocol.static final StringUse secure shell protocol.private StringThis may either 'git' or 'jgit' depending on the underlying implementation being used.private RepositoryUrlThe URL used to push to the upstream repository.static final StringSequence used to delimit the fetch URL.static final StringSequence used to delimit the push URL. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRelativePath(ScmProviderRepository ancestor) Get the relative path between the repository provided as argument and the current repository.private StringgetUrl(RepositoryUrl repoUrl) private StringparseHostAndPort(RepositoryUrl repoUrl, String url) Parse server and port from the given url and fill it into the given RepositoryUrl.private StringparseProtocol(RepositoryUrl repoUrl, String url) Parse the protocol from the given url and fill it into the given RepositoryUrl.private RepositoryUrlParse the given url string and store all the extracted information in aRepositoryUrlprivate StringparseUserInfo(RepositoryUrl repoUrl, String url) Parse the user information from the given url and fill user name and password into the given RepositoryUrl.toString()Methods inherited from class ScmProviderRepositoryWithHost
getHost, getPassphrase, getPort, getPrivateKey, setHost, setPassphrase, setPort, setPrivateKeyMethods inherited from class ScmProviderRepository
getParent, getPassword, getUser, getWorkItem, isPersistCheckout, isPushChanges, setPassword, setPersistCheckout, setPushChanges, setUser, setWorkItem
-
Field Details
-
URL_DELIMITER_FETCH
-
URL_DELIMITER_PUSH
-
PROTOCOL_SEPARATOR
-
PROTOCOL_FILE
-
PROTOCOL_GIT
-
PROTOCOL_SSH
-
PROTOCOL_HTTP
-
PROTOCOL_HTTPS
-
PROTOCOL_RSYNC
Use rsync for retrieving the data TODO implement!- See Also:
-
HOST_AND_PORT_EXTRACTOR
-
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:
-
provider
This may either 'git' or 'jgit' depending on the underlying implementation being used. -
fetchInfo
The URL used to fetch from the upstream repository. -
pushInfo
The URL used to push to the upstream repository.
-
-
Constructor Details
-
GitScmProviderRepository
- Throws:
ScmException
-
GitScmProviderRepository
- Throws:
ScmException
-
-
Method Details
-
getProvider
- Returns:
- either 'git' or 'jgit' depending on the underlying implementation being used
-
getFetchInfo
-
getPushInfo
-
getFetchUrl
- Returns:
- the URL used to fetch from the upstream repository
-
getFetchUrlWithMaskedPassword
- Returns:
- the URL to fetch from with masked password used for logging purposes only
-
getPushUrl
- Returns:
- the URL used to push to the upstream repository
-
getPushUrlWithMaskedPassword
- Returns:
- the URL to push to with masked password used for logging purposes only
-
parseUrl
Parse the given url string and store all the extracted information in aRepositoryUrl- Parameters:
url- to parse- Returns:
- filled with the information from the given URL
- Throws:
ScmException
-
getUrl
- Parameters:
repoUrl-- Returns:
- TODO
-
parseProtocol
Parse the protocol from the given url and fill it into the given RepositoryUrl.- Parameters:
repoUrl-url-- Returns:
- the given url with the protocol parts removed
- Throws:
ScmException
-
parseUserInfo
Parse the user information from the given url and fill user name and password into the given RepositoryUrl.- Parameters:
repoUrl-url-- Returns:
- the given url with the user parts removed
- Throws:
ScmException
-
parseHostAndPort
Parse server and port from the given url and fill it into the given RepositoryUrl.- Parameters:
repoUrl-url-- Returns:
- the given url with the server parts removed
- Throws:
ScmException
-
getRelativePath
Get the relative path between the repository provided as argument and the current repository.- Overrides:
getRelativePathin classScmProviderRepository- Parameters:
ancestor- another repository that should be ancestor of this one- Returns:
- the relative path or
nullif it can't be resolved
-
toString
-