Skip to content

Version 3.0.0

Compare
Choose a tag to compare
@TheSnoozer TheSnoozer released this 01 May 04:08
· 804 commits to master since this release

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

  • Java 1.7 is no longer supported with this version and at least Java 8 is required - #346
  • Introduced a more reliable way to deal with incremental builds for eclipse IDE - #385 / #366 / #269
  • Added a new property for setting if branch name should be taken from build environment or not (e.g. set <useBranchNameFromBuildEnvironment>false</useBranchNameFromBuildEnvironment>). This behaviour might be useful in combination with the JGitflow maven plugin #393.
  • Moved the project to a new git-commit-id organization account #384
  • Fixed a problem where the plugin hangs on windows under certain conditions and when there are too many changes in the git-repo #396 / #336
  • Allow the value of an replacementProperty to be empty #400 / #389
  • Introduced the new properties git.local.branch.ahead and git.local.branch.behind that provide some information if the local branch is either ahead or behind the remote. Note that using this property will perform a git fetch operation and may have a performance impact on the overall execution of the plugin. #395
  • Instead of determine all properties and then exclude properties, this plugin will now only ask for properties that are essential (proposal from #185). For a detailed performance comparison refer to the latest benchmark. Note: For users who want to avoid the the git fetch operation performed when gathering the properties git.local.branch.ahead and git.local.branch.behind simply exclude those to avoid that step:
<excludeProperties>
  <excludeProperty>^git.local.branch.*$</excludeProperty>
</excludeProperties>
  • Cleanup readme & Introduce coveralls #380 / #401 / #405
  • The plugin tried to extract the Bamboo build variables with the wrong case #410
  • Setting evaluateOnCommit to anything besides the default HEAD resulted only in the commit-id. in case users want to evaluateOnCommit on any commit or branch that is not the default HEAD, please be advised that this plugin will run git branch --points-at that may or may not result in a git.branch property that has multiple branches that are comma separated. If evaluateOnCommit is kept as the default HEAD the git.branch property still may fallback to the commit-id. #403
  • Have travis finally automatically deploy the snapshot version of the plugin #344 (see below how to get it)
  • Setting injectAllReactorProjects to true for multi-modules project now stores the computed properties in the project context. If the properties are present in the project context this plugin will essentially reuse those properties from a previously computed version (kudus to #411, implemented in #414)

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>3.0.0</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