【问题标题】:Maven Release Plugin Jenkins Keeps Copying Trunk into Tag instead of BranchMaven 发布插件 Jenkins 不断将 Trunk 复制到 Tag 而不是 Branch
【发布时间】:2018-02-27 12:57:30
【问题描述】:

我需要发布一个较旧的分支来满足不同团队的依赖关系。设置是通过 Jenkins 使用 maven-release 插件进行的。 正如标题所暗示的,一切顺利,直到它到达复制到标记阶段,在该阶段它不是复制分支,而是复制主干并在尝试构建它时失败,因为主干设置为部署到不同的连接。

请帮助我几乎一整天都在绞尽脑汁。

当前詹金斯的目标:

-X -DdryRun=${DRY_RUN_MODE} -DbranchName=release_1.243 -Dapp.svn.repo=${APP_SVN_REPO} 干净发布:准备发布:执行

当前配置:

<plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <branchName>release_1.243</branchName>
                    <tagNameFormat>release_branch_@{project.version}</tagNameFormat>
                </configuration>
            </plugin>


            <scm>
        <connection>${project.svn.repo}/trunk</connection>
        <!-- Because we have a single-module SVN repo with a FLAT multi-module
            file structure, we need to point to this parent pom's folder in the developer
            connection, not the root (trunk) repo. -->
        <developerConnection>scm:svn:${project.svn.repo}/trunk/app-parent</developerConnection>
    </scm>

【问题讨论】:

  • 如果您在一个分支上工作,那么您应该将 scm 部分更改为相应的分支?
  • 我在阅读您的评论之前就想通了,但您确实是正确的。谢谢

标签: java maven jenkins maven-release-plugin maven-scm


【解决方案1】:
connection>${mach.svn.repo}/branches/release_1.243</connection>
        <!-- Because we have a single-module SVN repo with a FLAT multi-module
            file structure, we need to point to this parent pom's folder in the developer
            connection, not the root (trunk) repo. -->
        <developerConnection>scm:svn:${mach.svn.repo}/branches/release_1.243/efx-parent</developerConnection>

这解决了它,但 khmarbaise 应该得到信任,即使我在阅读他的评论之前就解决了它。

【讨论】:

    猜你喜欢
    • 2014-09-12
    • 2015-11-25
    • 2013-01-21
    • 2018-09-16
    • 2013-04-02
    • 2018-06-02
    • 2013-09-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多