我找到了解决方案。
如果模块是分层结构的,它可以工作:
/trunk/parent /trunk/parent/childA /trunk/parent/childB
但您必须确保 SCM 参数 100% 正确。
IE:
/trunk/parent/pom.xml
<scm>
<connection>scm:svn:https://svnserver:18080/svn/trunk</connection>
<developerConnection>scm:svn:https://svnserver:18080/svn/trunk</developerConnection>
<url>https://svnserver:18080/viewvc/trunk</url>
</scm>
/trunk/parent/childA/pom.xml
<scm>
<connection>scm:svn:https://svnserver:18080/svn/trunk/childA</connection>
<developerConnection>scm:svn:https://svnserver:18080/svn/trunk/childA</developerConnection>
<url>https://svnserver:18080/viewvc/trunk/childA</url>
</scm>
/trunk/parent/childB/pom.xml
<scm>
<connection>scm:svn:https://svnserver:18080/svn/trunk/childB</connection>
<developerConnection>scm:svn:https://svnserver:18080/svn/trunk/childB</developerConnection>
<url>https://svnserver:18080/viewvc/trunk/childB</url>
</scm>
然后当您运行以下命令时: mvn release:branch -DbranchName= -DupdateBranchVersions=true -DupdateWorkingCopyVersions=true -DreleaseVersion= -DdevelopmentVersion=
所有模块都正确分支到 /branches/ 并自动更新所有版本和 SCM 属性