/branch-maven-plugin

Re-write SNAPSHOT versions to include a branch name

Primary LanguageJavaApache License 2.0Apache-2.0

Branch Maven Plugin

Based on the infrastructure provided by the Versions plugin (see below), the Branch plugin rewrites SNAPSHOT versions (for both projects and dependencies) to include a branch name passed in as parameter. These artifacts can then be deployed to a Maven repo without any risk of interference.

The plugin would typically be invoked in the CI environment (Jenkins) before building the project. When invoked from Jenkins, the branch is available as $GIT_BRANCH.

mvn com.clearcapital.maven.plugins:cc-branch-maven-plugin:1.0.0:branch -D branch=origin/CCP-1234

Below is the original description of the Versions plugin.

MojoHaus Versions Maven Plugin

This is the versions-maven-plugin.

Apache License, Version 2.0, January 2004 Maven Central Build Status

Releasing

  • Make sure gpg-agent is running.
  • Execute mvn -B release:prepare release:perform

For publishing the site do the following:

cd target/checkout
mvn verify site site:stage scm-publish:publish-scm