{"id":31543687,"url":"https://github.com/emergentdotorg/gittle","last_synced_at":"2026-04-14T06:33:24.143Z","repository":{"id":313576464,"uuid":"1051825847","full_name":"emergentdotorg/gittle","owner":"emergentdotorg","description":"Tools for generating and manipulating maven project versions from Git logs","archived":false,"fork":false,"pushed_at":"2025-10-09T07:38:55.000Z","size":109,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T17:16:45.856Z","etag":null,"topics":["git","maven","semantic-versioning"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emergentdotorg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-06T19:53:09.000Z","updated_at":"2025-10-09T06:59:32.000Z","dependencies_parsed_at":"2025-09-07T03:08:55.542Z","dependency_job_id":"7c64c8e3-8ad7-4e6d-af9b-7e242a42851e","html_url":"https://github.com/emergentdotorg/gittle","commit_stats":null,"previous_names":["emergentdotorg/gitver-maven-tools","emergentdotorg/gittle"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/emergentdotorg/gittle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emergentdotorg%2Fgittle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emergentdotorg%2Fgittle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emergentdotorg%2Fgittle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emergentdotorg%2Fgittle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emergentdotorg","download_url":"https://codeload.github.com/emergentdotorg/gittle/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emergentdotorg%2Fgittle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31785677,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","maven","semantic-versioning"],"created_at":"2025-10-04T12:31:05.436Z","updated_at":"2026-04-14T06:33:24.137Z","avatar_url":"https://github.com/emergentdotorg.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gittle\n\nTools for generating and manipulating maven project versions from Git logs.\n\n## Overview\n\nThis extension will set the project `revision` property based on the Git commit history.\n\nThe version format pattern is configurable and allows for using values such as the Git hash, branch name etc.\n\n## Configuration\n\nThis is a maven build core extension that can -\n\n- Participate in maven build lifecycle\n- Automatically set the building project's version\n- No explicit mojo executions needed to set the version\n- Project's POM remain unchanged\n\nTo use as a maven build extension, create (or modify) `extensions.xml` file in `${project.baseDir}/.mvn/` to have:\n\n```xml\n\u003c!-- .mvn/extensions.xml --\u003e\n\u003cextensions xmlns=\"http://maven.apache.org/EXTENSIONS/1.0.0\"\n            xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n            xsi:schemaLocation=\"http://maven.apache.org/EXTENSIONS/1.0.0\n                                http://maven.apache.org/xsd/core-extensions-1.0.0.xsd\"\u003e\n    \u003cextension\u003e\n        \u003cgroupId\u003eorg.emergent.gittle\u003c/groupId\u003e\n        \u003cartifactId\u003egittle-maven-extension\u003c/artifactId\u003e\n        \u003cversion\u003e${latest-version-here}\u003c/version\u003e\n    \u003c/extension\u003e\n\u003c/extensions\u003e\n```\n\nThen change the pom version (or parent version) element values to '${revision}', and add a default value for the\n`revision` property:\n\nA single-module project example:\n```xml\n\u003c!-- pom.xml --\u003e\n\u003cproject\u003e\n\n    \u003cgroupId\u003enet.sample\u003c/groupId\u003e\n    \u003cartifactId\u003eapp-1\u003c/artifactId\u003e\n    \u003cversion\u003e${revision}\u003c/version\u003e\n\n    \u003cproperties\u003e\n        \u003crevision\u003e0.0.1-SNAPSHOT\u003c/revision\u003e\n    \u003c/properties\u003e\n    \n    \u003c!-- ... --\u003e\n\u003c/project\u003e\n```\n\nA multi-module project example:\n```xml\n\u003c!-- pom.xml \n  Parent\n--\u003e\n\u003cproject\u003e\n\n    \u003cgroupId\u003enet.sample\u003c/groupId\u003e\n    \u003cartifactId\u003esample-parent\u003c/artifactId\u003e\n    \u003cversion\u003e${revision}\u003c/version\u003e\n\n    \u003cmodules\u003e\n        \u003cmodule\u003elib-a\u003c/module\u003e\n    \u003c/modules\u003e\n    \n    \u003cproperties\u003e\n        \u003crevision\u003e0.0.1-SNAPSHOT\u003c/revision\u003e\n    \u003c/properties\u003e\n\n    \u003c!-- ... --\u003e\n\u003c/project\u003e\n```\n\n```xml\n\u003c!-- lib-a/pom.xml\n  Child\n --\u003e\n\u003cproject\u003e\n\n    \u003cparent\u003e\n        \u003cgroupId\u003enet.sample\u003c/groupId\u003e\n        \u003cartifactId\u003esample-parent\u003c/artifactId\u003e\n        \u003cversion\u003e${revision}\u003c/version\u003e\n    \u003c/parent\u003e\n\n    \u003cartifactId\u003elib-a\u003c/artifactId\u003e\n    \n    \u003c!-- ... --\u003e\n\u003c/project\u003e\n```\n\n\nSee an example test project\nat [project-with-extension](gittle-maven-extension/src/test/resources/project-with-extension/).\n\nWith just that configuration, next time your project runs any maven goals, you should see version from this module\nis used by Maven reactor. Try running `mvn package` on your project.\n\n## Version Pattern Customization\n\nThe default version pattern is `%t(-%B)(-%C)(-%S)(+%H)(.%D)`, but this can be customized by setting the \n`gittle.versionPattern` property in the `.mvn/gittle-maven-extension.properties` file.\n\nThe following example will generate versions as `major.minor.patch+shorthash`, eg. `1.2.3+a5a29f8`.\n\nExample configuration for version pattern\n```properties\n# Will generate something like 1.2.3+a5a29f8\ngittle.versionPattern=%t+%h\n```\n\nAvailable Tokens for Version Pattern\n\nNote: Any token may be wrapped within parenthesis, along with other literal characters.  If the token evaluates to\nempty for strings or zero (0) for numbers then the entire group is omitted, for any other value the entire group is\nkept excluding the surrounding parenthesis.\n\n| Token | Description                                                          |\n|-------|----------------------------------------------------------------------|\n| %t    | Most recent tag name (by default dropping any 'v' prefix)            |\n| %b    | Branch name                                                          |\n| %B    | Branch name (empty when a release branch, by default main or master) |\n| %c    | Commit count (since most recent tag)                                 |\n| %C    | Commit count (empty when commit count would be zero)                 |\n| %h    | Short hash ref                                                       |\n| %H    | Short hash ref (empty when release branch and commit count is zero)  |\n| %f    | Full hash ref                                                        |\n| %F    | Full hash ref (empty when release branch and commit count is zero)   |\n| %S    | 'SNAPSHOT' (empty when commit count is zero)                         |\n| %D    | 'dirty' (empty when no uncommited changes exist in workspace)        |\n\n## Version Pattern Examples\n\n| Pattern           | %t = 1.2.3\u003cbr/\u003e%b = main\u003cbr/\u003e%c = 0 | %b = devel  | %c = 5           | %b = devel\u003cbr/\u003e%c = 5  |                                                                                                                 \n|-------------------|-------------------------------------|-------------|------------------|------------------------|\n| %t(-%B)(-%C)(-%S) | 1.2.3                               | 1.2.3-devel | 1.2.3-5-SNAPSHOT | 1.2.3-devel-5-SNAPSHOT |\n\n\n## Generated Version Access\n\nThis extension adds all the resolved properties to *Maven properties* during build cycle.\n\n```properties\n# example injected maven properties\ngittle.resolved.branch=main\ngittle.resolved.hash=67550ad6a64fe4e09bf9e36891c09b2f7bdc52f9\ngittle.resolved.hashShort=67550ad\ngittle.resolved.tagVersion=0.0.1\ngittle.resolved.commits=0\ngittle.resolved.dirty=false\ngittle.resolved.version=0.0.1\n```\n\nYou may use these properties in maven pom file, for example as `${gittle.resolved.branch}` to access git branch name.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femergentdotorg%2Fgittle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femergentdotorg%2Fgittle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femergentdotorg%2Fgittle/lists"}