https://github.com/git-commit-id/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... :-)
https://github.com/git-commit-id/git-commit-id-maven-plugin
build-automation continuous-delivery git maven maven-plugin versioning
Last synced: 10 days ago
JSON representation
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... :-)
- Host: GitHub
- URL: https://github.com/git-commit-id/git-commit-id-maven-plugin
- Owner: git-commit-id
- License: lgpl-3.0
- Created: 2011-02-13T13:55:14.000Z (about 14 years ago)
- Default Branch: master
- Last Pushed: 2025-03-31T08:51:07.000Z (18 days ago)
- Last Synced: 2025-04-02T00:30:58.691Z (17 days ago)
- Topics: build-automation, continuous-delivery, git, maven, maven-plugin, versioning
- Language: Java
- Homepage: http://www.kto.so
- Size: 3.61 MB
- Stars: 1,656
- Watchers: 39
- Forks: 303
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome - git-commit-id/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 deplo (Java)
README
# maven git commit id plugin
[](https://github.com/git-commit-id/git-commit-id-maven-plugin/actions)
[](https://coveralls.io/github/git-commit-id/git-commit-id-maven-plugin?branch=master)
[](https://central.sonatype.com/artifact/io.github.git-commit-id/git-commit-id-maven-plugin)Exports git version info to maven as properties in the `pom.xml` and as a file in the build output. Code generation and resource loading enable access to the build's version info at runtime.
Unsure if this addresses your problem? [Read about common use cases](docs/use-cases.md).## Quick Start
The plugin is **available from [Maven Central](https://central.sonatype.com/artifact/io.github.git-commit-id/git-commit-id-maven-plugin)**. Simply add the following to your `pom.xml`:
```xmlio.github.git-commit-id
git-commit-id-maven-plugin
9.0.1
get-the-git-infos
revision
initialize
true
${project.build.outputDirectory}/git.properties
full
```
## Minimum Requirements
* Java 11
* Maven 3.6.3## Documentation
* [Use Cases](docs/use-cases.md)
* [Configuration & Properties](docs/configuration-and-properties.md)
* [Access Version Info At Runtime](docs/access-version-info-at-runtime.md)
* [git describe](docs/git-describe.md)
* [All Configuration Options as Javadoc](src/main/java/pl/project13/maven/git/GitCommitIdMojo.java)
* [Frequently Asked Questions](docs/faq.md)
* [Contributing](CONTRIBUTING.md)
* [Releases](https://github.com/git-commit-id/git-commit-id-maven-plugin/releases)
* [Old Versions](docs/old-versions.md)
* [Snapshots](docs/snapshots.md)## Maintainers
This project is currently maintained thanks to: @ktoso (founder), @TheSnoozer## Notable contributions
I'd like to give a big thanks to some of these folks, for their suggestions and / or pull requests that helped make this plugin as popular as it is today:* @mostr - for bugfixes and a framework to do integration testing,
* @fredcooke - for consistent feedback and suggestions,
* @MrOnion - for a small yet fast bugfix,
* @cardil and @TheSnoozer - for helping with getting the native git support shipped,
* all the other contributors (as of writing 50) which can be on the [contributors tab](https://github.com/git-commit-id/git-commit-id-maven-plugin/graphs/contributors) - thanks guys,
* ... many others - thank you for your contributions,
* ... you! - for using the plugin :-)## Notable happy users
* [neo4j](https://neo4j.com/) – graph database
* [FoundationdDB](https://www.foundationdb.org/) – another open source database
* [Spring Boot](https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#using-boot-maven) – yes, the upstream Spring project is using us
* Akamai, Sabre, EasyDITA, and many many others,
* many others I don't know of.## License
I'm releasing this plugin under the **GNU Lesser General Public License 3.0**.
You're free to use it as you wish, the full license text is attached in the LICENSE file.
## Feature requests
The best way to ask for features / improvements is [via the Issues section on GitHub - it's better than email](https://github.com/git-commit-id/git-commit-id-maven-plugin/issues) because I won't loose when I have a "million emails inbox" day,
and maybe someone else has some idea or would like to upvote your issue.That's all folks! **Happy hacking!**