Skip to content

Sets the maven attribute 'describe' to the current git describe output. Currently directly executes git describe, no JGit implementation yet.

License

Notifications You must be signed in to change notification settings

lukegb/GitDescribe-Maven-Plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>

About

Sets the maven attribute 'describe' to the current git describe output. Currently directly executes git describe, no JGit implementation yet.

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages