带有 git + 开发人员连接的 Maven 发布插件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12280992/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 14:32:43  来源:igfitidea点击:

Maven release plugin with git + developer connection

gitmavenmaven-release-plugin

提问by crankparty

I am trying to use maven release plugin for creating a branch from trunk.

我正在尝试使用 maven 发布插件从主干创建一个分支。

Ex. repository.git/ child1/ child2/

前任。存储库.git/ child1/ child2/

The plugin creates a new branch that contains my entire repository. How can i restrict it to create a branch that contains only child1 ?

该插件创建了一个包含我的整个存储库的新分支。我如何限制它创建一个只包含 child1 的分支?

Currently the pom.xml connection, developer connection and url are as follows :

目前 pom.xml 连接、开发者连接和 url 如下:

<scm>
  <connection>scm:git:ssh://githost/repository.git</connection>
  <developerConnection>scm:git:ssh://githost/repository.git</developerConnection>
  <url>scm:git:ssh://githost/repository.git</url>
  <tag>HEAD</tag>
</scm>

In svn we used to achieve this by using the absolute path to child1 in developerConnection.

在 svn 中,我们曾经通过使用 developerConnection 中 child1 的绝对路径来实现这一点。

Thanks,

谢谢,

Gayathri

加亚特里

回答by crankparty

Releasing a multi-module maven project with Githelps + You need to upgrade to 2.3.2 version of maven-release-plugin

使用 Git 发布多模块 maven 项目有帮助 + 你需要升级到 2.3.2 版本的 maven-release-plugin