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 RepositoryUrl
the URL used to fetch from the upstream repositoryprivate static final Pattern
static final String
use local file as transportstatic final String
use gits internal protocolstatic final String
use the standard port 80 http protocolstatic final String
use the standard port 443 https protocolstatic final String
No special protocol specified.static final String
use rsync for retrieving the data TODO implement!static final String
this trails every protocolstatic final String
use secure shell protocolprivate String
this may either 'git' or 'jgit' depending on the underlying implementation being usedprivate RepositoryUrl
the URL used to push to the upstream repositorystatic final String
sequence used to delimit the fetch URLstatic final String
sequence 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 String
getUrl
(RepositoryUrl repoUrl) private String
parseHostAndPort
(RepositoryUrl repoUrl, String url) Parse server and port from the given url and fill it into the given RepositoryUrl.private String
parseProtocol
(RepositoryUrl repoUrl, String url) Parse the protocol from the given url and fill it into the given RepositoryUrl.private RepositoryUrl
Parse the given url string and store all the extracted information in aRepositoryUrl
private String
parseUserInfo
(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 org.apache.maven.scm.provider.ScmProviderRepositoryWithHost
getHost, getPassphrase, getPort, getPrivateKey, setHost, setPassphrase, setPort, setPrivateKey
Methods inherited from class org.apache.maven.scm.provider.ScmProviderRepository
getParent, getPassword, getUser, getWorkItem, isPersistCheckout, isPushChanges, setPassword, setPersistCheckout, setPushChanges, setUser, setWorkItem
-
Field Details
-
URL_DELIMITER_FETCH
sequence used to delimit the fetch URL- See Also:
-
URL_DELIMITER_PUSH
sequence used to delimit the push URL- See Also:
-
PROTOCOL_SEPARATOR
this trails every protocol- See Also:
-
PROTOCOL_FILE
use local file as transport- See Also:
-
PROTOCOL_GIT
use gits internal protocol- See Also:
-
PROTOCOL_SSH
use secure shell protocol- See Also:
-
PROTOCOL_HTTP
use the standard port 80 http protocol- See Also:
-
PROTOCOL_HTTPS
use the standard port 443 https protocol- See Also:
-
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
-
getPushUrl
- Returns:
- the URL used to push to the upstream repository
-
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:
-
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:
getRelativePath
in classScmProviderRepository
- Parameters:
ancestor
- another repository that should be ancestor of this one- Returns:
- the relative path or
null
if it can't be resolved
-
toString
-