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

Filter reactor projects that are concerned by a submodule branch operation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.1
    • None
    • branch
    • None
    • Patch

    Description

      We have the requirement to create a separate branch of one submodule when releasing the entire project. We solved this with the follwoing config in pom.xml of concerned submodule:

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

      We launch the release build of parent project with:

      mvn release:prepare release:perform -DreleaseProfiles=branchSubModule

      Beside issue adressed by MRELEASE-619, we also face the problem that all submodules are affected when our special submodule gets branched.

      We solved this issue by filtering reactor projects with the current working path.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lucien@wellernet.ch Lucien Weller
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: