Class ScmProviderRepository

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String password  
      private boolean persistCheckout  
      private boolean pushChanges  
      private java.lang.String user  
      private java.lang.String workItem
      Some SCMs have the concept of a work item (or task) which may need to be specified to allow changes to be pushed or delivered to a target.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ScmProviderRepository getParent()
      Get a ScmProviderRepository that represents the parent folder in the repository.
      java.lang.String getPassword()  
      java.lang.String getRelativePath​(ScmProviderRepository ancestor)
      Get the relative path between the repository provided as argument and the current repository.
      java.lang.String getUser()  
      java.lang.String getWorkItem()  
      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.
      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.
      void setPassword​(java.lang.String password)
      Set the password.
      void setPersistCheckout​(boolean persistCheckout)  
      void setPushChanges​(boolean pushChanges)  
      void setUser​(java.lang.String user)
      Set the user.
      void setWorkItem​(java.lang.String workItem)
      Set the workItem.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • user

        private java.lang.String user
      • password

        private java.lang.String password
      • persistCheckout

        private boolean persistCheckout
      • pushChanges

        private boolean pushChanges
        Since:
        1.4
      • workItem

        private java.lang.String workItem
        Some SCMs have the concept of a work item (or task) which may need to be specified to allow changes to be pushed or delivered to a target. This allows you to answer the question: For this workItem, what changed? Auditors have been known to love this... :) SCMs known to implement this are:
        • IBM Rational Team Concert (workItem)
        • Microsoft Team Foundation Server (workItem)
        • IBM Rational ClearQuest Enabled UCM ClearCase (task)
        There may be others that support this feature.

        These SCMs can be configured to reject a push/deliver unless additional information (by way of a workItem/task) is supplied.

        This field is only relevant when pushChanges = true.

        It should be noted however, when pushChanges = true, a workItem does not need to be set, as the need for a workItem may be optional.

        Since:
        1.9.5
    • Constructor Detail

      • ScmProviderRepository

        public ScmProviderRepository()
    • 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.
        Returns:
        TODO
        Since:
        1.4
      • setPushChanges

        public void setPushChanges​(boolean pushChanges)
        Parameters:
        pushChanges - TODO
        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:
        workItem - 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.

        Returns:
        TODO
      • setPersistCheckout

        public void setPersistCheckout​(boolean persistCheckout)
      • getParent

        public ScmProviderRepository getParent()
        Get a ScmProviderRepository 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.
        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 null if it can't be resolved
        Throws:
        java.lang.UnsupportedOperationException - unless overridden by subclass