[ https://jira.codehaus.org/browse/MSCMPUB-2?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311459#comment-311459 ]
Mark Hobson commented on MSCMPUB-2: ----------------------------------- The NPE has gone away but I'm afraid we still have line length problems :( {noformat} org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-scm-publish-plugin:1.0-SNAPSHOT:publish-scm (default-cli) on project X: Failed to add new files to SCM: The git-add command failed. 'C:\Users\mark\AppData\Local\Temp\git-add9095034289317458180bat' is not recognized as an internal or external command, operable program or batch file. at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to add new files to SCM: The git-add command failed. 'C:\Users\mark\AppData\Local\Temp\git-add9095034289317458180bat' is not recognized as an internal or external command, operable program or batch file. at org.apache.maven.plugins.scmpublish.AbstractScmPublishMojo.checkScmResult(AbstractScmPublishMojo.java:634) at org.apache.maven.plugins.scmpublish.AbstractScmPublishMojo.addFiles(AbstractScmPublishMojo.java:617) at org.apache.maven.plugins.scmpublish.ScmPublishPublishScmMojo.scmPublishExecute(ScmPublishPublishScmMojo.java:269) at org.apache.maven.plugins.scmpublish.AbstractScmPublishMojo.execute(AbstractScmPublishMojo.java:485) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more {noformat} The temporary file is 30646 characters long. Looks like this exceeds the 8192 limit of cmd.exe: http://blogs.msdn.com/b/oldnewthing/archive/2003/12/10/56028.aspx > publish-scm can fail with many files on windows. > ------------------------------------------------ > > Key: MSCMPUB-2 > URL: https://jira.codehaus.org/browse/MSCMPUB-2 > Project: maven-scm-publish-plugin > Issue Type: Bug > Environment: Cygwin, Windows > Reporter: Mark Hobson > Assignee: Olivier Lamy > > Running publish-scm with a large site can cause the command process to fail > due to the command line being too long. For example: > {noformat} > [INFO] --- maven-scm-publish-plugin:1.0-beta-1:publish-scm (scm-publish) @ X > --- > ... > [INFO] Executing: cmd.exe /X /C "git add -- <long list of files>" > {noformat} > Results in: > {noformat} > [ERROR] Failed to execute goal > org.apache.maven.plugins:maven-scm-publish-plugin:1.0-beta-1:publish-scm > (scm-publish) on project X: Failed to add new files to SCM: Exception while > executing SCM command. Error while executing command. Error while executing > process. Cannot run program "cmd.exe" (in directory X): CreateProcess > error=206, The filename or extension is too long -> [Help 1] > {noformat} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira