【发布时间】:2019-10-15 05:02:40
【问题描述】:
我们最近将我们的多模块(每个模块都有一个 pom.xml)存储库从 SVN 迁移到 GIT.SCM 连接中的所有 pom.xml 文件从 svn 更新到 git。
当我尝试使用 maven 发布插件从 git 存储库创建分支时,它失败并出现以下错误
"Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:branch (default-cli) on project intgr:签入过程出错:执行SCM命令时出现异常。错误执行命令时。执行过程时出错。无法运行程序“/bin/sh”(在目录“/u01/remote-agent-home/xml-data/build-dir/IN-CDBFG-JOB1/mahirepository”中):错误=7, 参数列表太长 -> [Help 1]"
在检查日志时,我了解到下面的命令产生了这个错误。
"[INFO] 正在检查修改后的 POM...[INFO] 正在执行:/bin/sh -c cd /u01/remote-agent-home/xml-data/build-dir/IN-CDBFG-JOB1/mahirepository && git add -- intgr-parent/pom.xml archetypes/pom.xml 和 1000 多个 pom 文件"
有什么办法可以解决或解决这个问题?
Maven 版本:Apache Maven 3.0.4 JDK版本:1.7.0_01
Maven 命令:
mvn -s ./settingsBamboo.xml --batch-mode release:branch -DbranchName=${bamboo.branchname} -DupdateWorkingCopyVersions=true -DsuppressCommitBeforeBranch=true -DautoVersionSubmodules=true -DremoteTagging=false -DupdateBranchVersions=false -X
【问题讨论】:
-
我建议首先更新您的 maven-release-plugin 版本其次我建议升级您的 Maven 版本..同时升级 Java 版本...
-
尝试使用以下更新版本,仍然面临同样的问题。 Maven 发布插件:2.5,Maven:3.5.0,JDK:1.8.0_212
标签: maven maven-3 maven-plugin maven-release-plugin maven-scm