【问题标题】:maven-release-plugin: Is the folder relevant in the scm section of the pom.xml?maven-release-plugin:pom.xml 的 scm 部分中的文件夹是否相关?
【发布时间】:2011-10-20 09:51:16
【问题描述】:

我们使用标准 svn 布局(/branches/x.y、/tags、/trunk)和 mvn 发布(即 maven-release-plugin)从分支执行发布。

我们通常会尝试确保该部分遵循分支,所以它看起来像这样

<scm>
    <connection>scm:svn:http://DOMAIN/svn/PROJECT/MODULE/branches/1.5</connection>
    <developerConnection>( same as connection )</developerConnection>
</scm>

谁能告诉我最后的“branches/1.5”是否是绝对必要的?还是 maven-plugin 无论如何都能解决这个问题?如果它是错误的会发生什么 - 假设我在 1.5 分支上并且 pom 的 scm 部分说 1.4 或主干?我没有立即尝试的愿望。 :-/

【问题讨论】:

    标签: svn version-control maven pom.xml maven-release-plugin


    【解决方案1】:

    考虑到Maven SCM url used fr Subversion

    scm:svn:http://[username[:password]@]server_name[:port]/path_to_repository
    scm:svn:http://svn.apache.org/svn/root/module
    

    ,您需要的是仓库中正确 Maven 模块的路径。
    Maven 将无法自行推断该路径,因此'branches/1.5' 是必要的。

    请参阅 SO 问题“With the maven-release-plugin, how to branch a module and its children?”以获取说明。

    【讨论】:

    • 如果你是对的,这不是一个很有帮助的例子。没有一个例子可以指定一个特定的分支,它们看起来都像我所说的 scm:svn:DOMAIN/svn/PROJECT/MODULE 而不是 scm:svn:DOMAIN/svn/PROJECT/MODULE/branches/x.y
    • @PapaFreud:但我链接的 SO 问题包含的示例更符合您的问题,不是吗?
    • @PapaFreud 基本上,您需要一个有pom.xml 的路径。
    • 好吧,我想我一直都做对了。 :) 我们不做 release:branch,只是一个简单的 release:prepare,release:perform,但是在检查了一个特定的分支之后。
    猜你喜欢
    • 1970-01-01
    • 2018-09-04
    • 1970-01-01
    • 1970-01-01
    • 2019-06-26
    • 2022-07-04
    • 1970-01-01
    • 2013-07-30
    • 1970-01-01
    相关资源
    最近更新 更多