Class SvnScmProviderRepository
- java.lang.Object
-
- org.apache.maven.scm.provider.ScmProviderRepository
-
- org.apache.maven.scm.provider.ScmProviderRepositoryWithHost
-
- org.apache.maven.scm.provider.svn.repository.SvnScmProviderRepository
-
public class SvnScmProviderRepository extends ScmProviderRepositoryWithHost
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
branchBase
The base directory for any branches.private java.lang.String
protocol
private java.lang.String
tagBase
The base directory for any tags.private java.lang.String
url
-
Constructor Summary
Constructors Constructor Description SvnScmProviderRepository(java.lang.String url)
SvnScmProviderRepository(java.lang.String url, java.lang.String user, java.lang.String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBranchBase()
Returns the url/directory to be used when tagging this repository.ScmProviderRepository
getParent()
Get aScmProviderRepository
that represents the parent folder in the repository.java.lang.String
getProtocol()
Get the protocol used in this repository (file://, http://, https://,...)java.lang.String
getRelativePath(ScmProviderRepository ancestor)
Get the relative path between the repository provided as argument and the current repository.java.lang.String
getTagBase()
Returns the url/directory to be used when tagging this repository.java.lang.String
getUrl()
private void
parseUrl(java.lang.String url)
void
setBranchBase(java.lang.String branchBase)
Sets the url/directory to be used when branching this repository.private void
setProtocol(java.lang.String protocol)
void
setTagBase(java.lang.String tagBase)
Sets the url/directory to be used when tagging this repository.java.lang.String
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
getPassword, getUser, getWorkItem, isPersistCheckout, isPushChanges, setPassword, setPersistCheckout, setPushChanges, setUser, setWorkItem
-
-
-
-
Field Detail
-
url
private java.lang.String url
-
protocol
private java.lang.String protocol
-
tagBase
private java.lang.String tagBase
The base directory for any tags. Can be relative to the repository URL or an absolute URL.
-
branchBase
private java.lang.String branchBase
The base directory for any branches. Can be relative to the repository URL or an absolute URL.
-
-
Method Detail
-
getUrl
public java.lang.String getUrl()
-
getTagBase
public java.lang.String getTagBase()
Returns the url/directory to be used when tagging this repository.
-
setTagBase
public void setTagBase(java.lang.String tagBase)
Sets the url/directory to be used when tagging this repository. The TagBase is a way to override the default tag location for the repository. The default tag location is automatically determined for repositories in the standard subversion layout (with /tags /branches /trunk). Specify this value only if the repository is using a directory other than "/tags" for tagging.- Parameters:
tagBase
- an absolute or relative url to the base directory to create tags in. URL should be in a format that svn client understands, not the scm url format.
-
getBranchBase
public java.lang.String getBranchBase()
Returns the url/directory to be used when tagging this repository.
-
setBranchBase
public void setBranchBase(java.lang.String branchBase)
Sets the url/directory to be used when branching this repository. The BranchBase is a way to override the default branch location for the repository. The default branch location is automatically determined for repositories in the standard subversion layout (with /tags /branches /trunk). Specify this value only if the repository is using a directory other than "/branches" for branching.- Parameters:
branchBase
- an absolute or relative url to the base directory to create branch in. URL should be in a format that svn client understands, not the scm url format.
-
setProtocol
private void setProtocol(java.lang.String protocol)
-
getProtocol
public java.lang.String getProtocol()
Get the protocol used in this repository (file://, http://, https://,...)- Returns:
- the protocol
-
parseUrl
private void parseUrl(java.lang.String url)
-
getParent
public ScmProviderRepository getParent()
Get aScmProviderRepository
that represents the parent folder in the repository. Useful when the repository does not exist yet and we need to create it from the parent.- Overrides:
getParent
in classScmProviderRepository
- Returns:
- the parent repository
-
getRelativePath
public java.lang.String getRelativePath(ScmProviderRepository ancestor)
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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-