Package org.apache.maven.scm.provider
Class ScmProviderRepository
- java.lang.Object
-
- org.apache.maven.scm.provider.ScmProviderRepository
-
- Direct Known Subclasses:
ClearCaseScmProviderRepository,LocalScmProviderRepository,ScmProviderRepositoryStub,ScmProviderRepositoryWithHost,SynergyScmProviderRepository,TfsScmProviderRepository
public abstract class ScmProviderRepository extends java.lang.Object- Author:
- Trygve Laugstøl, Emmanuel Venisse, Chris Graham
-
-
Constructor Summary
Constructors Constructor Description ScmProviderRepository()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScmProviderRepositorygetParent()Get aScmProviderRepositorythat represents the parent folder in the repository.java.lang.StringgetPassword()java.lang.StringgetRelativePath(ScmProviderRepository ancestor)Get the relative path between the repository provided as argument and the current repository.java.lang.StringgetUser()java.lang.StringgetWorkItem()booleanisPersistCheckout()Will checkouts using this repository be persisted so they can be refreshed in the future? This property is of concern to SCMs like Perforce and Clearcase where the server must track where a user checks out to.booleanisPushChanges()Should distributed changes be pushed to the central repository? For many distributed SCMs like Git, a change like a commit is only stored in your local copy of the repository.voidsetPassword(java.lang.String password)Set the password.voidsetPersistCheckout(boolean persistCheckout)voidsetPushChanges(boolean pushChanges)voidsetUser(java.lang.String user)Set the user.voidsetWorkItem(java.lang.String workItem)Set the workItem.
-
-
-
Method Detail
-
getUser
public java.lang.String getUser()
- Returns:
- The user.
-
setUser
public void setUser(java.lang.String user)
Set the user.- Parameters:
user- The user
-
getPassword
public java.lang.String getPassword()
- Returns:
- The password.
-
setPassword
public void setPassword(java.lang.String password)
Set the password.- Parameters:
password- The user password
-
isPushChanges
public boolean isPushChanges()
Should distributed changes be pushed to the central repository? For many distributed SCMs like Git, a change like a commit is only stored in your local copy of the repository. Pushing the change allows your to more easily share it with other users.- Since:
- 1.4
-
setPushChanges
public void setPushChanges(boolean pushChanges)
- Parameters:
pushChanges-- Since:
- 1.4
-
getWorkItem
public java.lang.String getWorkItem()
- Returns:
- The workItem.
- Since:
- 1.9.5
-
setWorkItem
public void setWorkItem(java.lang.String workItem)
Set the workItem.- Parameters:
user- The workItem.- Since:
- 1.9.5
-
isPersistCheckout
public boolean isPersistCheckout()
Will checkouts using this repository be persisted so they can be refreshed in the future? This property is of concern to SCMs like Perforce and Clearcase where the server must track where a user checks out to. If false, the server entry (clientspec in Perforce terminology) will be deleted after the checkout is complete so the files will not be able to be updated. This setting can be overriden by using the system property "maven.scm.persistcheckout" to true. The default is false. See SCM-113 for more detail.
-
setPersistCheckout
public void setPersistCheckout(boolean persistCheckout)
-
getParent
public ScmProviderRepository getParent()
Get aScmProviderRepositorythat represents the parent folder in the repository. Useful when the repository does not exist yet and we need to create it from the parent.- Returns:
- the parent repository
- Throws:
java.lang.UnsupportedOperationException- unless overridden by subclass
-
getRelativePath
public java.lang.String getRelativePath(ScmProviderRepository ancestor)
Get the relative path between the repository provided as argument and the current repository.- Parameters:
ancestor- another repository that should be ancestor of this one- Returns:
- the relative path or
nullif it can't be resolved - Throws:
java.lang.UnsupportedOperationException- unless overridden by subclass
-
-