Adrian Herscu created MSCMPUB-60: ------------------------------------ Summary: publishing site to git on windows fails with command too long Key: MSCMPUB-60 URL: https://issues.apache.org/jira/browse/MSCMPUB-60 Project: Maven SCM Publish Plugin Issue Type: Bug Affects Versions: 3.2.1 Environment: Windows Reporter: Adrian Herscu
When publishing to git branch from Windows host following happens: 2023-08-31T04:43:44.8053798Z 04:43:44 [INFO] --- scm-publish:3.1.0:publish-scm (default-cli) @ qa-automation --- 2023-08-31T04:43:50.8952579Z 04:43:50 [WARNING] No output encoding, defaulting to UTF-8. 2023-08-31T04:43:50.9048410Z 04:43:50 [INFO] Checking out the pub tree from scm:git:ssh://g...@github.com/QA-Automation-Starter/qa-automation.git into D:\a\qa-automation\qa-automation\target\scmpublish-checkout 2023-08-31T04:43:50.9329396Z 04:43:50 [INFO] Executing: cmd.exe /X /C "git clone --branch gh-pages ssh:********@github.com/QA-Automation-Starter/qa-automation.git scmpublish-checkout" 2023-08-31T04:43:50.9332148Z 04:43:50 [INFO] Working directory: D:\a\qa-automation\qa-automation\target 2023-08-31T04:44:01.0144166Z 04:44:01 [INFO] Executing: cmd.exe /X /C "git ls-remote ssh:********@github.com/QA-Automation-Starter/qa-automation.git" 2023-08-31T04:44:01.0146723Z 04:44:01 [INFO] Working directory: C:\Users\RUNNER~1\AppData\Local\Temp 2023-08-31T04:44:02.3685365Z 04:44:02 [INFO] Executing: cmd.exe /X /C "git pull ssh:********@github.com/QA-Automation-Starter/qa-automation.git gh-pages:gh-pages" 2023-08-31T04:44:02.3687871Z 04:44:02 [INFO] Working directory: D:\a\qa-automation\qa-automation\target\scmpublish-checkout 2023-08-31T04:44:03.6973213Z 04:44:03 [INFO] Executing: cmd.exe /X /C "git checkout gh-pages" 2023-08-31T04:44:03.6979436Z 04:44:03 [INFO] Working directory: D:\a\qa-automation\qa-automation\target\scmpublish-checkout 2023-08-31T04:44:04.1606742Z 04:44:04 [INFO] Executing: cmd.exe /X /C "git ls-files" 2023-08-31T04:44:04.1610452Z 04:44:04 [INFO] Working directory: D:\a\qa-automation\qa-automation\target\scmpublish-checkout 2023-08-31T04:44:04.3082825Z 04:44:04 [INFO] Updating checkout directory with actual content in D:\a\qa-automation\qa-automation\target\staging 2023-08-31T04:44:06.6806440Z 04:44:06 [INFO] Content consists of 168 directories and 983 files = 21 MB 2023-08-31T04:44:06.6809227Z 04:44:06 [INFO] Publishing content to SCM will result in 0 addition(s), 983 update(s), 1752 delete(s) 2023-08-31T04:44:06.8551690Z 04:44:06 [INFO] Deleting files: [qa-jgiven-commons\apidocs\overview-tree.html, qa-jgiven-commons\apidocs\serialized-form.html, qa-jgiven-commons\apidocs\constant-values.html, qa- followed by: 2023-08-31T04:44:07.2098516Z 04:44:07 [INFO] Executing: cmd.exe /X /C "git rm -r qa-jgiven-commons/apidocs/overview-tree.html qa-jgiven-commons/apidocs/serialized-form.html qa-jgiven-commons/apidocs/constant- long long long command... failing with: 2023-08-31T04:44:07.3271831Z 04:44:07 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-scm-publish-plugin:3.1.0:publish-scm (default-cli) on project qa-automation: Failed to delete removed files to SCM: Exception while executing SCM command. Error while executing command. Error while executing process. Cannot run program "cmd.exe" (in directory "D:\a\qa-automation\qa-automation\target\scmpublish-checkout"): CreateProcess error=206, The filename or extension is too long -> [Help 1] -- This message was sent by Atlassian Jira (v8.20.10#820010)