Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-672

branching a sub module during a build

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Abandoned
    • Affects Version/s: 2.1
    • Fix Version/s: None
    • Component/s: branch
    • Environment:
      maven-release-plugin 2.1 with SVN
    • Flags:
      Patch

      Description

      We have to requirement to create a reparate branch of a part of your source tree (concretely a sub module) somtime when building the entire tree. We automated this with a profile in pom.xml of that sub-module where we configured branch goal as part of packag phase with something like this:

      <profile>
      	<id>makeBranch</id>
      	<build>
      		<plugins>
      			<plugin>
      				<groupId>org.apache.maven.plugins</groupId>
      				<artifactId>maven-release-plugin</artifactId>
      				<executions>
      					<execution>
      						<id>make-branch</id>
      						<phase>package</phase>
      						<goals>
      							<goal>branch</goal>
      						</goals>
      						<configuration>
      							<branchName>re${project.version}-branch</branchName>
      							<developmentVersion>${project.version}</developmentVersion>
      							<updateBranchVersions>true</updateBranchVersions>
      							<releaseVersion>${project.version}-00-SNAPSHOT</releaseVersion>
      						</configuration>
      					</execution>
      				</executions>
      			</plugin>
      		</plugins>
      	</build>
      </profile>
      

      Unfortunately we faced two problems:

      • Scm URL was not correctly handled for sub-module, acording path of module. This issue was already solved for Tagging in release preparation (see MRELEASE-261). We ported the fix for branching.
      • With actual implementation all projects of a reactor build are considered by branch goal. We solved this issue by filtering projects according their relative path.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              lucien@wellernet.ch Lucien Weller
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: