Uploaded image for project: 'Maven SCM'
  1. Maven SCM
  2. SCM-428

url syntax not good enough for the git scm provider

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.1
    • 1.2
    • None

    Description

      The problem is that git supports 2 different URL schemes. For the normal RFC 2396 standard and ssh style. So in theory all these styles should work:

      normal anonymous absolute:

      git clone git://github.com/olamy/scm-git-test-one-module.git

      normal anonymous relative:

      git clone git://github.com:olamy/scm-git-test-one-module.git

      normal developer absolute:

      git clone ssh://git@github.com/olamy/scm-git-test-one-module.git

      normal developer relative:

      git clone ssh://git@github.com/~git/olamy/scm-git-test-one-module

      ssh developer absolute:

      git clone git@github.com/olamy/scm-git-test-one-module.git

      ssh developer relative:

      git clone git@github.com:olamy/scm-git-test-one-module

      In reality the ssh:// URL is not always supported. (For example github does not). In fact they suggest to use

      normal anonymous absolute:

      git://github.com/olamy/scm-git-test-one-module.git

      ssh developer relative:

      git@github.com:olamy/scm-git-test-one-module.git

      For the initial checkout the developer will use the command line and set "git@github.com:olamy/scm-git-test-one-module.git" as the remote address. So subsequent commits and tags (from the plugin) can work just fine as the URL does not need to be specified anymore. But when the release plugin checks out the code it will fail if the proper developer url "ssh://git@github.com/~git/olamy/scm-git-test-one-module" (normal developer relative) is set. (As the maven pom seems to expect that format).

      There are 3 ways to fix or work around this:

      1) Use the normal anonymous URLs for both connections (developer and anonymous) inside the pom. This will confused developers though as the generated site tells the new developers to use the anonymous URL to checkout the code. They will not be able to push if they do.

      2) Have the scm/release plugin ignore the developer URL and use the anonymous URL for the checkout. Again this will be confusing on the generated site as the normal developer rel/abs URLs might not be supported.

      3) Somehow store the URL in the format "git@github.com:olamy/scm-git-test-one-module" in the pom. The problem is that the POM expects the normal (RFC 2396) format AFAIU.

      Attachments

        Issue Links

          Activity

            People

              olamy Olivier Lamy
              olamy Olivier Lamy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: