You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2015/04/12 21:42:12 UTC

[jira] [Commented] (SCM-797) Fix for windows command line length limitation

    [ https://issues.apache.org/jira/browse/SCM-797?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14491676#comment-14491676 ] 

Robert Scholte commented on SCM-797:
------------------------------------

There's a huge difference between adding and committing files. For the first one it's not a problem to do it file by file (you're just marking them as committable), but for the latter it is. You want all these files to be part of the same commit.
So it looks like for Windows it can't be solved properly for commandline git, but did you try switching to the jgit implementation? See http://maven.apache.org/scm/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-jgit/index.html


> Fix for windows command line length limitation
> ----------------------------------------------
>
>                 Key: SCM-797
>                 URL: https://issues.apache.org/jira/browse/SCM-797
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.9.4
>         Environment: Windows
>            Reporter: Radovan Murin
>            Priority: Critical
>              Labels: Maven, SCM
>
> Hello,
> I noticed that for a project with a large amount of pom files the prepare command of the release plugin fails when it tries to git add all of the poms.
> The failure happens because the SCM plugin attempts to git add all of the files at once which fails on Windows machines due to the command line length limitation.
> I have written a small fix and created a pull request
> https://github.com/apache/maven-scm/pull/30
> Basicaly, with the fix, the command git add iterates on all files rather than adding them in one command. The fix was already present in the code in 
> the GitAddCommand.java. However there was one more place in the code with the bug.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)