Git Describe Maven Plugin

This plugin is designed to give you a build number. So when you might make 100 builds of version 1.0-SNAPSHOT, you can differentiate between them all. It does this by taking the output of git describe and saving it into a Maven build variable, so you can reference the value in your POM.

License

License

The MIT License
Categories

Categories

Maven Build Tools
GroupId

GroupId

com.lukegb.mojo
ArtifactId

ArtifactId

gitdescribe-maven-plugin
Last Version

Last Version

3.0
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

Git Describe Maven Plugin
This plugin is designed to give you a build number. So when you might make 100 builds of version 1.0-SNAPSHOT, you can differentiate between them all. It does this by taking the output of git describe and saving it into a Maven build variable, so you can reference the value in your POM.
Project URL

Project URL

https://github.com/lukegb/GitDescribe-Maven-Plugin/
Source Code Management

Source Code Management

https://github.com/lukegb/GitDescribe-Maven-Plugin

Download gitdescribe-maven-plugin

How to add to project

<plugin>
    <groupId>com.lukegb.mojo</groupId>
    <artifactId>gitdescribe-maven-plugin</artifactId>
    <version>3.0</version>
</plugin>

Dependencies

compile (6)

Group / Artifact Type Version
org.apache.maven : maven-project jar 2.0.6
org.apache.maven : maven-settings jar 2.0.6
org.apache.maven : maven-core jar 2.0.6
org.apache.maven : maven-plugin-api jar 2.0.6
org.codehaus.plexus : plexus-container-default jar 1.0-alpha-9-stable-1
org.apache.maven.scm : maven-scm-api jar 1.2

Project Modules

There are no modules declared in this project.

Git-describe Maven plugin

This plugin invokes git describe and captures the output in a build variable.

Configuration

The plugin might be configured in your pom like so:

      <plugin>
        <groupId>com.lukegb.mojo</groupId>
        <artifactId>gitdescribe-maven-plugin</artifactId>
        <version><!-- Version --></version>
        <executions>
          <execution>
            <goals>
              <goal>gitdescribe</goal>
            </goals>
            <id>git-describe</id>
            <phase>initialize</phase>
            <configuration>
              <!-- configuration properties go here. -->
            </configuration>
          </execution>
        </executions>
      </plugin>

Configuration properties

The following configuration properties are available:

descriptionProperty (Default: describe)
  The name of the build property that will contain the output of git
  describe.

failOutput (Default: unknown)
  String indicating full output if getting version fails

outputPrefix
  String to prepend to git describe/shorttag output.

outputSuffix
  String to append to git describe/shorttag output.

setReactorProjectsProperties (Default: false)
  If true, set the properties on reactor projects.

extraArguments
  Array of flags to pass to git, wrapped inside `<param>` elements.

Configuration Example

The plugin might be configured in your pom like so:

  <configuration>
    <extraArguments>
      <param>--dirty</param>
      <param>--tags</param>
    </extraArguments>
    <setReactorProjectsProperties>true</setReactorProjectsProperties>
  </configuration>

Versions

Version
3.0
2.0
1.3