【发布时间】:2013-07-11 10:30:53
【问题描述】:
我正在使用 Maven 3.0.4。我有一个多模块项目,没什么花哨或异国情调:
/pom.xml (aggregator pom)
parent/
pom.xml
childA/
pom.xml (inherits from ../parent/pom.xml)
childB/
pom.xml (inherits from ../parent/pom.xml)
在根级别有一个trunk/branches/tags。
所有 pom 都有 scm 部分:
pom.xml:
<scm>
<developerConnection>scm:svn:https://mysvnrepo.com/svn/project/trunk</developerConnection>
</scm>
parent/pom.xml:
<scm>
<developerConnection>scm:svn:https://mysvnrepo.com/svn/project/trunk/parent</developerConnection>
</scm>
childA/pom.xml:
<scm>
<developerConnection>scm:svn:https://mysvnrepo.com/svn/project/trunk/childA</developerConnection>
</scm>
正如其他人在此处和 JIRA 中的多个错误报告中所报告的那样,当我执行 mvn release:prepare 时,创建的标签是顶级项目,但不是标记树干,而是标记了上一层。所以项目根目录如下:
/
trunk/
branches/
tags/
project-0.0.1/
trunk/
branches/
tags/
我似乎没有找到解决方案。错误报告表明它已在某些版本中得到修复,然后在其他版本中引入了回归。甚至据报道它已修复的版本,也有人报告说它没有。
我已经尝试过发布插件的 v2.0、2.1、2.4.1。我在顶层的 scm url 中添加了一个尾随 '/'。没有任何帮助。
我的设置有什么明显的问题吗?
更新:所以我们没有充分的理由将聚合器和父 pom 分开,所以我们将它们结合起来,发布插件按预期工作。仍然很惊讶这不起作用,因为我不认为这是一个奇特的设置。如果 maven 家伙想要一个示例项目,我很乐意尝试提出一个。
【问题讨论】:
标签: svn maven-3 tagging maven-release-plugin multi-module