org.apache.maven.scm.provider.git.repository

## 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

-     public class GitScmProviderRepository
      extends ScmProviderRepositoryWithHost

  Version:
    $Id: GitScmProviderRepository.java 831139 2009-10-29 22:51:57Z olamy $
  Author:
    Emmanuel Venisse, Mark Struberg

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `PROTOCOL_FILE` use local file as transport
    `static String` | `PROTOCOL_GIT` use gits internal protocol
    `static String` | `PROTOCOL_HTTP` use the standard port 80 http protocol
    `static String` | `PROTOCOL_HTTPS` use the standard port 443 https protocol
    `static String` | `PROTOCOL_NONE` No special protocol specified.
    `static String` | `PROTOCOL_RSYNC` use rsync for retrieving the data TODO implement!
    `static String` | `PROTOCOL_SEPARATOR` this trails every protocol
    `static String` | `PROTOCOL_SSH` use secure shell protocol
    `static String` | `URL_DELIMITER_FETCH` sequence used to delimit the fetch URL
    `static String` | `URL_DELIMITER_PUSH` sequence used to delimit the push URL

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GitScmProviderRepository(String url)`
    `GitScmProviderRepository(String url, String user, String password)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `RepositoryUrl` | `getFetchInfo()`
    `String` | `getFetchUrl()`
    `String` | `getProvider()`
    `RepositoryUrl` | `getPushInfo()`
    `String` | `getPushUrl()`
    `String` | `getRelativePath(ScmProviderRepository ancestor)` Get the relative path between the repository provided as argument and the current repository.
    `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

      `getParent, getPassword, getUser, isPersistCheckout, setPassword, setPersistCheckout, setUser`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### URL_DELIMITER_FETCH

          public static final String URL_DELIMITER_FETCH

      sequence used to delimit the fetch URL
      See Also:
        Constant Field Values

    - #### URL_DELIMITER_PUSH

          public static final String URL_DELIMITER_PUSH

      sequence used to delimit the push URL
      See Also:
        Constant Field Values

    - #### PROTOCOL_SEPARATOR

          public static final String PROTOCOL_SEPARATOR

      this trails every protocol
      See Also:
        Constant Field Values

    - #### PROTOCOL_FILE

          public static final String PROTOCOL_FILE

      use local file as transport
      See Also:
        Constant Field Values

    - #### PROTOCOL_GIT

          public static final String PROTOCOL_GIT

      use gits internal protocol
      See Also:
        Constant Field Values

    - #### PROTOCOL_SSH

          public static final String PROTOCOL_SSH

      use secure shell protocol
      See Also:
        Constant Field Values

    - #### PROTOCOL_HTTP

          public static final String PROTOCOL_HTTP

      use the standard port 80 http protocol
      See Also:
        Constant Field Values

    - #### PROTOCOL_HTTPS

          public static final String PROTOCOL_HTTPS

      use the standard port 443 https protocol
      See Also:
        Constant Field Values

    - #### PROTOCOL_RSYNC

          public static final String PROTOCOL_RSYNC

      use rsync for retrieving the data TODO implement!
      See Also:
        Constant Field Values

    - #### PROTOCOL_NONE

          public static final String 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:
        Constant Field Values

  - ### Constructor Detail

    - #### GitScmProviderRepository

          public GitScmProviderRepository(String url)
                                   throws ScmException

      Throws:
        `ScmException`

    - #### GitScmProviderRepository

          public GitScmProviderRepository(String url,
                                  String user,
                                  String password)
                                   throws ScmException

      Throws:
        `ScmException`

  - ### Method Detail

    - #### getProvider

          public String getProvider()

      Returns:
        either 'git' or 'jgit' depending on the underlying implementation being used

    - #### getFetchInfo

          public RepositoryUrl getFetchInfo()

    - #### getPushInfo

          public RepositoryUrl getPushInfo()

    - #### getFetchUrl

          public String getFetchUrl()

      Returns:
        the URL used to fetch from the upstream repository

    - #### getPushUrl

          public String getPushUrl()

      Returns:
        the URL used to push to the upstream repository

    - #### getRelativePath

          public String getRelativePath(ScmProviderRepository ancestor)

      Get the relative path between the repository provided as argument and the current repository.
      Overrides:
        `getRelativePath` in class `ScmProviderRepository`
      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 String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2003–2015. All rights reserved.