Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1
    • Component/s: maven-scm-provider-git
    • Labels:
      None
    • Environment:
      Developed on Mac OS X 10.3.9 with git 1.2.4

      Description

      Please find the git provider as attachment.

      Usefulness:
      I used the git provider together with [http://maven.apache.org/plugins/maven-release-plugin|maven-release-plugin], it works fine for that use case.

      Open issues:

      • the JUnit tests are "proprietary", not yet TCK. I'll fix that.

      If you want to run the tests, you must have git installed and it must be in your PATH.

      To run git:

      • on Windows: use Cygwin and install the binutils, openssh, openssl, rsync, curl
        than you are able to compile and install git
      • on Linux: there are packages somewhere
      • on Mac OS X: use the DarwinPorts
      1. git.patch
        102 kB
        Dominik Winter
      2. git.tar.bz2
        15 kB
        Dominik Winter
      3. SCM-182.patch
        0.6 kB
        Dominik Winter
      4. update1.patch.bz2
        11 kB
        Heinrich Nirschl

        Activity

        Dominik Winter created issue -
        Hide
        Dominik Winter added a comment -

        POM patch

        Show
        Dominik Winter added a comment - POM patch
        Dominik Winter made changes -
        Field Original Value New Value
        Attachment SCM-182.patch [ 21490 ]
        Hide
        Dominik Winter added a comment -

        New files; contains the git provider updated for version 1.0-SNAPSHOT

        Show
        Dominik Winter added a comment - New files; contains the git provider updated for version 1.0-SNAPSHOT
        Dominik Winter made changes -
        Attachment git.tar.bz2 [ 21491 ]
        Hide
        Dominik Winter added a comment -

        patch from 2006-04-06 is obsolete

        Show
        Dominik Winter added a comment - patch from 2006-04-06 is obsolete
        Emmanuel Venisse made changes -
        Component/s maven-scm-site [ 11197 ]
        Component/s maven-scm-provider-git [ 12667 ]
        Emmanuel Venisse made changes -
        Fix Version/s future [ 12423 ]
        Hide
        Heinrich Nirschl added a comment - - edited

        Attachment update1.patch.bz2 is an update of Dominik's patch to work with current versions of git (1.5.3.4) and scm (1.1-SNAPSHOT).

        Show
        Heinrich Nirschl added a comment - - edited Attachment update1.patch.bz2 is an update of Dominik's patch to work with current versions of git (1.5.3.4) and scm (1.1-SNAPSHOT).
        Heinrich Nirschl made changes -
        Attachment update1.patch.bz2 [ 30013 ]
        Hide
        Mark Struberg added a comment -

        Hi!

        Please also take a look at my implementation

        web-git at http://ns1.backwork.net/git/
        or
        git-clone http://ns1.backwork.net/git/maven-scm-providers-git.git

        It is very similar to the existing scm providers like SVN and CVS, so it is split in git-commons, gittest and gitexe submodules. It also can be extended by a gitjava module using egit very easily in the future.

        It includes and successfully passes TCK tests and has been tested on Linux using git 1.5.3.3 and 1.5.3.4.

        Show
        Mark Struberg added a comment - Hi! Please also take a look at my implementation web-git at http://ns1.backwork.net/git/ or git-clone http://ns1.backwork.net/git/maven-scm-providers-git.git It is very similar to the existing scm providers like SVN and CVS, so it is split in git-commons, gittest and gitexe submodules. It also can be extended by a gitjava module using egit very easily in the future. It includes and successfully passes TCK tests and has been tested on Linux using git 1.5.3.3 and 1.5.3.4.
        Hide
        Eugene Kuleshov added a comment - - edited

        Mark, unfortunately your provider doesn't work on Windows, or alt least it is failing for me on clone command with the error 'git-clone' is not recognized as an internal or external command, operable program or batch file.

        On windows you can't run shell scripts like that and have to run them trough the shell (e.g. using "bash git-clone" command, or run it using "git clone" instead). I've tried to replace "-" with " " in those commands and it seem fixed issue on Windows.

        Show
        Eugene Kuleshov added a comment - - edited Mark, unfortunately your provider doesn't work on Windows, or alt least it is failing for me on clone command with the error 'git-clone' is not recognized as an internal or external command, operable program or batch file. On windows you can't run shell scripts like that and have to run them trough the shell (e.g. using "bash git-clone" command, or run it using "git clone" instead). I've tried to replace "-" with " " in those commands and it seem fixed issue on Windows.
        Jason van Zyl made changes -
        Assignee Jason van Zyl [ jason ]
        Hide
        Jason van Zyl added a comment -

        I've committed this to trunk.

        Show
        Jason van Zyl added a comment - I've committed this to trunk.
        Jason van Zyl made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Brett Porter made changes -
        Fix Version/s future [ 12423 ]
        Fix Version/s 1.1 [ 13984 ]
        Hide
        Torbjørn Vatn added a comment -

        I'm having some issues getting this provider to work sadly. So far I've tried this:

        1. git cloning http://ns1.backwork.net/git/maven-scm-providers-git.git and running mvn clean install
        2. vim'ing into .m2/repository/org/apache/maven/scm/maven-scm-providers/1.0/maven-scm-providers-1.0.pom and adding <module>maven-scm-providers-git</module> in the modules section of the file.
        3. Adding this to my projects pom.xml:
        <scm>
        <connection>scm:git:git://github.com/torbjornvatn/fitnesse-pom-widget.git</connection>
        <url>scm:git:git://github.com/torbjornvatn/fitnesse-pom-widget.git</url>
        </scm>
        4. running scm:status only gives my the error message:
        [ERROR] BUILD ERROR
        [INFO] ------------------------------------------------------------------------
        [INFO] Cannot run status command :
        Embedded error: Can't load the scm provider.
        No such provider: 'git'.

        Can anyone give my some pointers to what I'm doing wrong. I'm a big fan of git and really wants to get this maven provider working.

        Thanks in advance!

        Show
        Torbjørn Vatn added a comment - I'm having some issues getting this provider to work sadly. So far I've tried this: 1. git cloning http://ns1.backwork.net/git/maven-scm-providers-git.git and running mvn clean install 2. vim'ing into .m2/repository/org/apache/maven/scm/maven-scm-providers/1.0/maven-scm-providers-1.0.pom and adding <module>maven-scm-providers-git</module> in the modules section of the file. 3. Adding this to my projects pom.xml: <scm> <connection>scm:git:git://github.com/torbjornvatn/fitnesse-pom-widget.git</connection> <url>scm:git:git://github.com/torbjornvatn/fitnesse-pom-widget.git</url> </scm> 4. running scm:status only gives my the error message: [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Cannot run status command : Embedded error: Can't load the scm provider. No such provider: 'git'. Can anyone give my some pointers to what I'm doing wrong. I'm a big fan of git and really wants to get this maven provider working. Thanks in advance!
        Hide
        Mark Struberg added a comment -

        The full way to get it up and running is a bit complicated, since if you like to use the git provider for releasing, no snapshot has to be in your pom.

        You could either build the whole maven2 project from source, or only the scm parts.

        Probably the most easiest way is to make a 'private' release of the whole maven-scm-plugin (I used the extension 'msx-1') and the maven-release-plugin. It is important that those versions are no SNAPSHOTS (otherwise the release will fail). Then use it as:

            <plugins>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-plugin</artifactId>
                <version>1.1-msx-1</version>
                <dependencies>
                  <dependency>
                    <groupId>org.apache.maven.scm</groupId>
                    <artifactId>maven-scm-provider-gitexe</artifactId>
                    <version>1.1-msx-1</version>
                  </dependency>
                </dependencies>
              </plugin>
              <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.0-beta-8-msx-1</version>
                <dependencies>
                  <dependency>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <version>1.1-msx-1</version>
                  </dependency>
                  <dependency>
                    <groupId>org.apache.maven.scm</groupId>
                    <artifactId>maven-scm-api</artifactId>
                    <version>1.1-msx-1</version>
                  </dependency>          
                </dependencies>
              </plugin>
            </plugins>
        

        This is mainly a workaround for testing the scm provider with released maven versions (I tested with 2.0.4, 2.0.8 and SNAPSHOT)
        And we will get rid of all this pain if 1.1 is finally released soon.

        Show
        Mark Struberg added a comment - The full way to get it up and running is a bit complicated, since if you like to use the git provider for releasing, no snapshot has to be in your pom. You could either build the whole maven2 project from source, or only the scm parts. Probably the most easiest way is to make a 'private' release of the whole maven-scm-plugin (I used the extension 'msx-1') and the maven-release-plugin. It is important that those versions are no SNAPSHOTS (otherwise the release will fail). Then use it as: <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-scm-plugin</artifactId> <version>1.1-msx-1</version> <dependencies> <dependency> <groupId>org.apache.maven.scm</groupId> <artifactId>maven-scm-provider-gitexe</artifactId> <version>1.1-msx-1</version> </dependency> </dependencies> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> <version>2.0-beta-8-msx-1</version> <dependencies> <dependency> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-scm-plugin</artifactId> <version>1.1-msx-1</version> </dependency> <dependency> <groupId>org.apache.maven.scm</groupId> <artifactId>maven-scm-api</artifactId> <version>1.1-msx-1</version> </dependency> </dependencies> </plugin> </plugins> This is mainly a workaround for testing the scm provider with released maven versions (I tested with 2.0.4, 2.0.8 and SNAPSHOT) And we will get rid of all this pain if 1.1 is finally released soon.
        Hide
        Don Brown added a comment -

        For those that can't wait, I branched trunk and created a 1.1-db-1 release of the git provider, which works like a charm. No need to fork any of the maven plugins. For more information, see http://www.jroller.com/mrdon/entry/maven_enabled_project_hosting_with

        Show
        Don Brown added a comment - For those that can't wait, I branched trunk and created a 1.1-db-1 release of the git provider, which works like a charm. No need to fork any of the maven plugins. For more information, see http://www.jroller.com/mrdon/entry/maven_enabled_project_hosting_with
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        Can this branch replace the current git provider in trunk ?

        Show
        Olivier Lamy (*$^¨%`£) added a comment - Can this branch replace the current git provider in trunk ?
        Hide
        Don Brown added a comment -

        All I did was branch the git provider in trunk so that I could release it against scm 1.0. Therefore, whenever scm 1.1 is released and included in a Maven release, this branch will no longer be necessary.

        Show
        Don Brown added a comment - All I did was branch the git provider in trunk so that I could release it against scm 1.0. Therefore, whenever scm 1.1 is released and included in a Maven release, this branch will no longer be necessary.
        Hide
        Eugene Kuleshov added a comment -

        Don, you don't really need to branch, fork or release plugin in order to pass by release plugin restrictions. You just need to lock snapshot version, e.g. 1.1-20080622.233710-32 from Sonatype repository at http://repository.sonatype.org/content/repositories/maven.snapshots/

        Also, I think it would worth to first ask in the Maven developers list about scm release instead of screwing with the community.

        Show
        Eugene Kuleshov added a comment - Don, you don't really need to branch, fork or release plugin in order to pass by release plugin restrictions. You just need to lock snapshot version, e.g. 1.1-20080622.233710-32 from Sonatype repository at http://repository.sonatype.org/content/repositories/maven.snapshots/ Also, I think it would worth to first ask in the Maven developers list about scm release instead of screwing with the community.
        Hide
        Don Brown added a comment -

        How, in any way, is this screwing with the community? First of all, having a separate version of the scm 1.1 provider prevents you from having to modify the release plugin in order to pull in the scm plugin, and second, the code works so why not have a tagged release today for those of us that don't want to wait for Maven 1.1?

        Open Source is about the freedom to be able to scratch your itch and share the solution with others; not about some ivory tower club dictating what the masses use. My branch is freely available in the Maven sandbox, so if you see something you'd like to merge back or even contribute, please feel free.

        Show
        Don Brown added a comment - How, in any way, is this screwing with the community? First of all, having a separate version of the scm 1.1 provider prevents you from having to modify the release plugin in order to pull in the scm plugin, and second, the code works so why not have a tagged release today for those of us that don't want to wait for Maven 1.1? Open Source is about the freedom to be able to scratch your itch and share the solution with others; not about some ivory tower club dictating what the masses use. My branch is freely available in the Maven sandbox, so if you see something you'd like to merge back or even contribute, please feel free.
        Hide
        Eugene Kuleshov added a comment -

        Don, please read my comment. You don't need to release, just lock the version. And again, if it works, why didn't you ask for release in the Maven dev list?

        Show
        Eugene Kuleshov added a comment - Don, please read my comment. You don't need to release, just lock the version. And again, if it works, why didn't you ask for release in the Maven dev list?
        Hide
        Mark Struberg added a comment -

        Eugene, are you and Jason cleaning the snapshot repo at sonatype on a regular basis, or will the snapshot remain there 'forever'?
        (I ask this, because in our company I do clean our snapshot repo every month to ensure that nobody is using snapshot versions in production).

        There are many roads leading to Rome, and I have to admit that the most important part in this discussion (at least for me as author) is to hear that the plugin is useful for the community and it now works out of the box for many people. So, I'm not screwed but rather happy to hear that Don succeed using it. Plus: the more attraction it gets, the more people will try using git with maven since there is no showstopper in this scenario anymore!

        I will ask for the status and plans for scm-1.1 in the scm dev list.

        Show
        Mark Struberg added a comment - Eugene, are you and Jason cleaning the snapshot repo at sonatype on a regular basis, or will the snapshot remain there 'forever'? (I ask this, because in our company I do clean our snapshot repo every month to ensure that nobody is using snapshot versions in production). There are many roads leading to Rome, and I have to admit that the most important part in this discussion (at least for me as author) is to hear that the plugin is useful for the community and it now works out of the box for many people. So, I'm not screwed but rather happy to hear that Don succeed using it. Plus: the more attraction it gets, the more people will try using git with maven since there is no showstopper in this scenario anymore! I will ask for the status and plans for scm-1.1 in the scm dev list.
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        As the branch in the sandbox looks to works.
        We can merge it to trunk.
        Objections ?

        Show
        Olivier Lamy (*$^¨%`£) added a comment - As the branch in the sandbox looks to works. We can merge it to trunk. Objections ?
        Olivier Lamy (*$^¨%`£) made changes -
        Assignee Jason van Zyl [ jason ] Olivier Lamy [ olamy ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Resolution Fixed [ 1 ]
        Hide
        Olivier Lamy (*$^¨%`£) added a comment -

        ok no merge needed.

        Show
        Olivier Lamy (*$^¨%`£) added a comment - ok no merge needed.
        Olivier Lamy (*$^¨%`£) made changes -
        Resolution Fixed [ 1 ]
        Status Reopened [ 4 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 12:22:36 UTC 2015 [ 1428236556206 ]
        Mark Thomas made changes -
        Workflow jira [ 12725194 ] Default workflow, editable Closed status [ 12758132 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 01:08:37 UTC 2015 [ 1428282517778 ]
        Mark Thomas made changes -
        Workflow jira [ 12963166 ] Default workflow, editable Closed status [ 13000239 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        730d 2h 35m 1 Jason van Zyl 05/Apr/08 17:56
        Closed Closed Reopened Reopened
        121d 21h 55m 1 Olivier Lamy (*$^¨%`£) 05/Aug/08 15:52
        Reopened Reopened Closed Closed
        1d 4h 2m 1 Olivier Lamy (*$^¨%`£) 06/Aug/08 19:54

          People

          • Assignee:
            Olivier Lamy (*$^¨%`£)
            Reporter:
            Dominik Winter
          • Votes:
            5 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development