Skip to content

Version 4.0.1

Compare
Choose a tag to compare
@TheSnoozer TheSnoozer released this 15 Jul 21:49
· 673 commits to master since this release

Version 4.0.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:

  • #454: add support for git.branch and git.build.number for GitHub Actions
  • #457 / #460: Add a forceValueEvaluation-switch to the replacementProperty to tell the plugin that the value needs to be regenerated for every project. Note that this will make the plugin run for every project (e.g. which might be needed for sonar that requires unique keys for the sonar)
  • #459 / #460: the git execution no longer fails on remote repository url's that don't follow a correct url-syntax (e.g. https://:@git.server.com/pathToRepo.git)
  • #472 / #502: prevent header timestamp in git.properties to allow for reproducible builds
  • #493: remove dependency on google guava
  • #496: add support for git.branch and git.build.number for AWS CodeBuild
  • #503: upgrade to jackson 2.11.1

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>4.0.1</version>
</dependency>

Getting the latest snapshot (build automatically)

If you can't wait for the next release, you can also get the latest snapshot version from sonatype, that is being deployed automatically by travis:

<pluginRepositories>
    <pluginRepository>
        <id>sonatype-snapshots</id>
        <name>Sonatype Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </pluginRepository>
</pluginRepositories>

Even though travis will only deploy a new snapshot once all tests have finished, it is recommended to rely on the released and more stable version.

Known Issues / Limitations:

  • This plugin is unfortunately not working with Heroku which is due to the fact how Heroku works. In summary Heroku does not copy over the .git-repository but in order to determine the git properties this plugin relies on the fact that it has access to the git-repository. A somewhat workaround to get some information is outlined in #279 (comment)
  • Using maven's plugin prefix resolution (e.g. mvn com.test.plugins:myPlugin:myMojo) might result in unresolved properties even with <injectAllReactorProjects>true</injectAllReactorProjects>. Please refer to #287 or #413 (comment) for details and potential workarounds

Reporting Problems

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