4

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

Ex. repository.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 ?

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

<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.

Thanks,

Gayathri

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
crankparty
  • 1,230
  • 3
  • 17
  • 26
  • Branches in git are [different](http://stackoverflow.com/a/12160744/877115) from branches in SVN. What exactly are you trying to do? Divide the repository in two, or something else? – Christopher Sep 05 '12 at 13:31
  • Say, i want to release only child1. so i don't want child2 to be present in child1's release branch. In other words, i don't want to increment the version of child2 – crankparty Sep 06 '12 at 06:16
  • http://stackoverflow.com/questions/6727450/releasing-a-multi-module-maven-project-with-git helped. – crankparty Sep 27 '12 at 19:01
  • Possible duplicate of [Releasing a multi-module maven project with Git](https://stackoverflow.com/questions/6727450/releasing-a-multi-module-maven-project-with-git) – Jens Mar 19 '18 at 20:15

1 Answers1

6

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

Community
  • 1
  • 1
crankparty
  • 1,230
  • 3
  • 17
  • 26