Version 6.0.0
Version 6.0.0 is finally there and includes various bug-fixes and improvements :-)
Potential Breaking changes:
The main key-aspects that might cause a breakage when migrating to the new version:
- updates several plugins used by the project
- updated git-commit-id-plugin-core from 5.0.0 to 6.0.0-rc.5, that update brings
- updated joda-time.joda-time from 2.10.10 to 2.12.5
- git-commit-id/git-commit-id-plugin-core#18: added org.yaml:snakeyaml version 2.0
- git-commit-id/git-commit-id-plugin-core#18: added the ability to generate XML and YML files
- integrated more common code from git-commit-id-maven-plugin into git-commit-id-plugin-core
- git-commit-id/git-commit-id-plugin-core#17: the AzureDevOpsBuildServerData now uses BUILD_SOURCEBRANCH instead of BUILD_SOURCEBRANCHNAME
- git-commit-id/git-commit-id-plugin-core#6: dropped LoggerBridge and replaced it with LogInterface
- introduced a GenericFileManager that allows to read / write properties in all formats (properties, json, xml, yml, ...)
- property files are now UTF-8 encoded instead of using ISO_8859_1
- git-commit-id/git-commit-id-plugin-core#8: get file store attr async to improve jgit startup performance
- git-commit-id/git-commit-id-plugin-core#11 / git-commit-id/git-commit-id-plugin-core#10: Add parameter in function maybeGeneratePropertiesFile in order to choose to escape unicode or not
various dependency updates - #615: set the org.apache.maven:maven-plugin-api and org.apache.maven:maven-core as scope=provided
- updated commons-io:commons-io from 2.9.0 to 2.11.0
- externalized the git directories used for integration tests as git submodule
New Features / Bug-Fixes:
The main key-aspects that have been improved or being worked on are the following:
- modernized the issue templates
- added dependabot to automatically update dependencies
- added tests for java 11 - java 20
- git-commit-id/git-commit-id-plugin-core#18: added the ability to generate XML and YML files (see above)
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>io.github.git-commit-id</groupId>
<artifactId>git-commit-id-maven-plugin</artifactId>
<version>6.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 github actions:
<pluginRepositories>
<pluginRepository>
<id>sonatype-snapshots</id>
<name>Sonatype Snapshots</name>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</pluginRepository>
</pluginRepositories>
Even though the github actions 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