git-commit-id-maven-plugin

Maven plugin which includes build-time git repository information into an POJO / *.properties). Make your apps tell you which version exactly they were built from! Priceless in large distributed deployments... :-)

LGPL-3.0 License

Stars
1.6K

Bot releases are visible (Hide)

git-commit-id-maven-plugin - Version 2.2.5

Published by TheSnoozer about 6 years ago

Version 2.2.5 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

The main key-aspects that have been improved or being worked on are the following:

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.2.5</version>
</dependency>

Known Issues / Limitations:

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.2.4

Published by TheSnoozer almost 7 years ago

Version 2.2.4 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

The main key-aspects that have been improved or being worked on are the following:

  • Fixing an issue where -Dmaven.gitcommitid.skip=true does not skip the plugin execution when the configuration in the POM includes a <skip>false</skip> - https://github.com/ktoso/maven-git-commit-id-plugin/issues/315
  • Support for all Maven 3.X versions - https://github.com/ktoso/maven-git-commit-id-plugin/issues/316
  • The runningOnBuildServer check for detecting the branch name on Jenkins / Hudson is now using 'HUDSON_HOME' and 'JENKINS_HOME' as well - https://github.com/ktoso/maven-git-commit-id-plugin/issues/326
  • The in-built replacement of properties (only for properties generated by the plugin) now can also change the casing of the properties that the user wants to replace (e.g. lower case VS upper case). This behaviour can be achieved by defining a list of transformationRules for the property where those rules should take effect. Each transformationRule consist of two required fields apply and action. The apply-tag controls when the rule should be applied and can be set to BEFORE to have the rule being applied before or it can be set to AFTER to have the rule being applied after the replacement. The action-tag determines the string conversion rule that should be applied. Currenlty supported is LOWER_CASE and UPPER_CASE. Potential candidates in the feature are CAPITALIZATION and INVERT_CASE (open a ticket if you need them...).
<replacementProperties>
  <!-- example: apply replacement only to the specific property git.branch and replace '/' with '-' -->
  <replacementProperty>
    <property>git.branch</property>
    <!-- will not overwrite the existing property and generate a new `git.branch.something` -->
    <propertyOutputSuffix>something</propertyOutputSuffix>
    <token>^([^\/]*)\/([^\/]*)$</token>
    <value>$1-$2</value>
    <regex>true</regex>
    <transformationRules>
      <transformationRule>
        <apply>BEFORE</apply>
        <action>UPPER_CASE</action>
      </transformationRule>
      <transformationRule>
        <apply>AFTER</apply>
        <action>LOWER_CASE</action>
      </transformationRule>
    </transformationRules>
  </replacementProperty>
</replacementProperties>

See https://github.com/ktoso/maven-git-commit-id-plugin/issues/317 for more details on a use-case.

<gitDescribe>
<tags>true</tags>
</gitDescribe>

will cause that lightweight tags are also included for the closest tags

Also the pattern used inside the gitDescribe might have an impact on the resulting git.closest.tag.name and git.closest.tag.count

  • this project now has an Issue Template that is being used for every new issue by default - https://github.com/ktoso/maven-git-commit-id-plugin/issues/337
  • Under certain conditions the JGit implementation yielded wrong results inside the exposed git.tags property (basically it wasn't reporting all tags of a given commit) - https://github.com/ktoso/maven-git-commit-id-plugin/issues/339
  • A new option to allow to tell the plugin what commit should be used as reference to generate the properties from (https://github.com/ktoso/maven-git-commit-id-plugin/issues/338). By default this property is simply set to HEAD which should reference to the latest commit in your repository. In general this property can be set to something generic like HEAD^1 or point to a branch or tag-name. To support any kind or use-case this configuration can also be set to an entire commit-hash or it's abbreviated version. Please note that for security purposes not all references might be allowed as configuration.
    The configuration can be used in the following:
<evaluateOnCommit>HEAD</evaluateOnCommit>

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.2.4</version>
</dependency>

Known Issues / Limitations:

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.1.10

Published by TheSnoozer about 7 years ago

Version 2.1.10 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.1.10</version>
</dependency>

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.1.11

Published by TheSnoozer about 7 years ago

Version 2.1.11 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.1.11</version>
</dependency>

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.1.12

Published by TheSnoozer about 7 years ago

Version 2.1.12 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.1.12</version>
</dependency>

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.1.13

Published by TheSnoozer about 7 years ago

Version 2.1.13 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

  • Using -dirty as default dirty-marker for git describe - https://github.com/ktoso/maven-git-commit-id-plugin/issues/149
  • fixed an endless build loop in Eclipse which was causes by the fact that the generated properties file was put into the source-folder and thus seemed to retrigger the eclipse build. With a new build the git-plugin updated the file with a new buildDate which then caused eclipse to detect a changed file and going into an endless cylce - https://github.com/ktoso/maven-git-commit-id-plugin/issues/151
  • Fix differences in the output of native and jgit - https://github.com/ktoso/maven-git-commit-id-plugin/pull/155
  • In previous versions the injectAllReactorProjects that was used by this plugin might have overwriten non-git properties in reactor projects. This property was previously set to true and will now be set to false.
    Please note: if you are using your git-properties inside your pom-file you need to manually set this property to true (e.g. <injectAllReactorProjects>true</injectAllReactorProjects>)

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.1.13</version>
</dependency>

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.1.14

Published by TheSnoozer about 7 years ago

Version 2.1.14 is finally there and includes various bug-fixes and improvements :-)

Additional maintainer:

This project is currently maintained thanks to: @ktoso (founder), @TheSnoozer

New Features / Bug-Fixes:

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.1.14</version>
</dependency>

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.1.15

Published by TheSnoozer about 7 years ago

Version 2.1.15 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

The main key-aspects that have been improved or being worked on are the following:

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.1.15</version>
</dependency>

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.2.0

Published by TheSnoozer about 7 years ago

Version 2.2.0 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

The main key-aspects that have been improved or being worked on are the following:

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.2.0</version>
</dependency>

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.2.1

Published by TheSnoozer about 7 years ago

Version 2.2.1 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

The main key-aspects that have been improved or being worked on are the following:

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.2.1</version>
</dependency>

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.2.2

Published by TheSnoozer about 7 years ago

Version 2.2.2 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

The main key-aspects that have been improved or being worked on are the following:

<plugin>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.2.2</version>
    <!-- optional to change the phases of the individual mojo's -->
    <executions>
        <execution>
            <id>get-the-git-infos</id>
            <goals>
                <goal>revision</goal>
            </goals>
        </execution>
        <execution>
            <id>validate-the-git-infos</id>
            <goals>
                <goal>validateRevision</goal>
            </goals>
            <!-- default phase is validate -->
            <phase>package</phase>
        </execution>
    </executions>
    <configuration>
        <validationProperties>
            <validationProperty>
                <value>${project.version}</value>
                <regex>^\Q${git.commit.id.describe}\E$|.*-SNAPSHOT$</regex>
            </validationProperty>
            <validationProperty>
                <value>${git.dirty}</value>
                <regex>false</regex>
            </validationProperty>
            <failIfNoMatch>true</failIfNoMatch>
        </validationProperties>
    </configuration>
</plugin>

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.2.2</version>
</dependency>

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.2.3

Published by TheSnoozer about 7 years ago

Version 2.2.3 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

The main key-aspects that have been improved or being worked on are the following:

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.2.3</version>
</dependency>

Known Issues / Limitations:

Reporting Problems

If you find any problem with this plugin, feel free to report it here

git-commit-id-maven-plugin - Version 2.1.9

Published by ktoso over 10 years ago

Version 2.1.9 is finally there and includes various bug-fixes and improvements :-)

New Features / Bug-Fixes:

Allows to filter which properties you want to expose (for example you might want to hide repo url, or email).

Main feature: https://github.com/ktoso/maven-git-commit-id-plugin/commit/7c2bea0cac8e645af9a4bb0e4271170140df5738 resolves issue https://github.com/ktoso/maven-git-commit-id-plugin/issues/91

Getting the latest release

The plugin is available from Maven Central (see here), so you don't have to configure any additional repositories to use this plugin. All you need to do is to configure it inside your project as dependency:

<dependency>
    <groupId>pl.project13.maven</groupId>
    <artifactId>git-commit-id-plugin</artifactId>
    <version>2.1.9</version>
</dependency>

Reporting Problems

If you find any problem with this plugin, feel free to report it here

Package Rankings
Top 6.12% on Repo1.maven.org
Badges
Extracted from project README
Build Status Coverage Status Maven Central