Maven plugin for branch checks

This plugin is designed to force the current branch to track the changes from another branch and fail if there are differences.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.bluetrainsoftware.maven
ArtifactId

ArtifactId

branch-check-maven-plugin
Last Version

Last Version

1.3
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Maven plugin for branch checks
This plugin is designed to force the current branch to track the changes from another branch and fail if there are differences.
Source Code Management

Source Code Management

http://github.com/rvowles/branch-check-maven-plugin

Download branch-check-maven-plugin

How to add to project

<plugin>
    <groupId>com.bluetrainsoftware.maven</groupId>
    <artifactId>branch-check-maven-plugin</artifactId>
    <version>1.3</version>
</plugin>

Dependencies

compile (4)

Group / Artifact Type Version
com.bluetrainsoftware.composite : composite-maven-plugin jar [1,2)
com.bluetrainsoftware.composite : composite-groovy jar [2.1,3)
com.bluetrainsoftware.composite : composite-unit-test jar [1,2)
org.eclipse.jgit : org.eclipse.jgit jar 4.0.1.201506240215-r

Project Modules

There are no modules declared in this project.

Fail on Changes Plugin

This plugin allows your build to fail if it is trying to package without tracking changes to another branch. It is particularly useful if you have another master branch happening and you don’t want unexpected reversions happening, particularly on the build server.

It uses JGit to load the repository, and specifies one other branch to track. It will fail if changes are detected and put them into the log.

<profiles>
  <profile>
    <id>change-track</id>

    <activation>
      <activeByDefault>false</activeByDefault>
      <property>
        <name>failOnMissedMerge</name>
        <value>true</value>
      </property>
    </activation>

    <build>
      <plugins>
        <plugin>
          <groupId>com.bluetrainsoftware.maven</groupId>
          <artifactId>branch-check-maven-plugin</artifactId>
          <version>1.1-SNAPSHOT</version>
          <executions>
            <execution>
              <goals>
                <goal>change-track</goal>
              </goals>
              <!-- sooner is better -->
              <phase>generate-resources</phase>
              <configuration>
                <trackedBranch>refs/heads/executable-refactor</trackedBranch>
                <fetchOrigin>origin</fetchOrigin> <!-- only use if you want to fetch as part of the process -->
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </build>
  </profile>
</profiles>

Versions

Version
1.3
1.2
1.1