如何在Maven Pom中自动设置scm连接?

时间:2018-12-12 08:01:58

标签: maven svn

我们正在尝试运行release:prepare,但这会产生如下错误。

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:
        prepare (default-cli) on project test-module:
        Missing required setting:
        scm connection or developerConnection must be specified. -> [Help 1]

我们要避免手动设置scm.connection。

如何将scm.connection自动设置为当前URL? -对于SVN和git。

该信息必须位于(元数据)模块内,因为svn info会显示URL下的值。

1 个答案:

答案 0 :(得分:1)

原则上,您应该可以使用参数来设置developerConnection,但是(由于khmarbaise告诉我)存在一个错误(https://issues.apache.org/jira/browse/MRELEASE-1017),因此目前无法正常工作。 / p>

我目前使用自己的Maven插件解决此问题。它将pom的connection和developerConnection条目与构建服务器提供的URL进行比较(构建服务器知道URL,因为它签出了代码),并在必要时调整了URL(后跟scm:checkin)。

相关问题