{"id":15042857,"url":"https://github.com/seart-group/git-submodule-maven-plugin","last_synced_at":"2025-04-12T11:16:06.162Z","repository":{"id":249836387,"uuid":"832134777","full_name":"seart-group/git-submodule-maven-plugin","owner":"seart-group","description":"Plugin used for updating Git submodules in Maven projects","archived":false,"fork":false,"pushed_at":"2025-03-31T14:37:07.000Z","size":204,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T11:16:05.755Z","etag":null,"topics":["cicd","git","git-submodules","java","java-8","jgit","maven","maven-plugin","mit-license","status","submodule","update"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seart-group.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-07-22T12:19:42.000Z","updated_at":"2025-03-31T14:37:04.000Z","dependencies_parsed_at":"2024-08-26T17:29:47.830Z","dependency_job_id":"5356b6a1-98f0-40c6-8485-8e44f6e25e28","html_url":"https://github.com/seart-group/git-submodule-maven-plugin","commit_stats":null,"previous_names":["seart-group/git-submodule-maven-plugin"],"tags_count":3,"template":false,"template_full_name":"seart-group/template-maven-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seart-group%2Fgit-submodule-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seart-group%2Fgit-submodule-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seart-group%2Fgit-submodule-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seart-group%2Fgit-submodule-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seart-group","download_url":"https://codeload.github.com/seart-group/git-submodule-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248557847,"owners_count":21124168,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["cicd","git","git-submodules","java","java-8","jgit","maven","maven-plugin","mit-license","status","submodule","update"],"created_at":"2024-09-24T20:48:08.973Z","updated_at":"2025-04-12T11:16:06.132Z","avatar_url":"https://github.com/seart-group.png","language":"Java","readme":"# Git Submodule Maven Plugin \u0026middot; [![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/seart-group/git-submodule-maven-plugin/deploy.yml)](https://github.com/seart-group/git-submodule-maven-plugin/actions/workflows/deploy.yml) [![Maven Central](https://img.shields.io/maven-central/v/ch.usi.si.seart/git-submodule-maven-plugin)](https://central.sonatype.com/artifact/ch.usi.si.seart/git-submodule-maven-plugin) [![javadoc](https://javadoc.io/badge2/ch.usi.si.seart/git-submodule-maven-plugin/javadoc.svg)](https://javadoc.io/doc/ch.usi.si.seart/git-submodule-maven-plugin) [![MIT license](https://img.shields.io/github/license/seart-group/git-submodule-maven-plugin)](https://github.com/seart-group/git-submodule-maven-plugin/blob/master/LICENSE)\n\nThis plugin is used to initialise `git` submodules in Maven projects. An absolute life-saver when performing releases.\n\n## Rationale\n\nWhen working with Maven projects that have `git` submodules, it is often necessary to clone the submodules before\nbuilding. This is especially true when performing releases, as the submodules aren't initialised by the\n`maven-release-plugin` when building in a sandbox. This is a problem we've faced regularly in the past, most notably\nwith our [java-tree-sitter](https://github.com/seart-group/java-tree-sitter) project. The only\n[solution](https://stackoverflow.com/q/6938142/17173324) proposed by the community involved the use of the\n`exec-maven-plugin` to run a recursive initialisation and update of submodules within a project. Although viable,\nfrequently copying and pasting the same configuration across projects tends to get annoying after the first few times.\nThis is without mentioning the technical debt that would be incurred by having to maintain the same configuration in\nmultiple projects. This project was born out a necessity to provide a more Maven-like, drop-in solution to the described\nproblem.\n\n## Requirements\n\n* Java 8 or later\n* Maven 3.6.3 or later\n\n\u003e [!NOTE]\n\u003e Although it operates on Git submodules, this plugin doesn't require `git` to be installed on the system. Instead, it\n\u003e uses the Eclipse [JGit](https://www.eclipse.org/jgit/) library to interact with the VCS through Java. As a result, the\n\u003e plugin will still work in environments such as Docker containers and CI/CD pipelines.\n\n## Usage\n\nAdd the following to the `plugins` section of your `pom.xml`:\n\n```xml\n\u003cplugin\u003e\n  \u003cgroupId\u003ech.usi.si.seart\u003c/groupId\u003e\n  \u003cartifactId\u003egit-submodule-maven-plugin\u003c/artifactId\u003e\n  \u003cversion\u003e1.1.1\u003c/version\u003e\n  \u003c!-- configurations and executions go here --\u003e  \n\u003c/plugin\u003e\n```\n\n## Goals\n\n### `status`\n\nEquivalent to running `git submodule status --recursive`. Given that this goal only lists the status of the submodules\nin the project, its primary use is for debugging. It is not bound to any lifecycle phase by default. That being said,\nyou can execute it directly from the command line:\n\n```shell\nmvn ch.usi.si.seart:git-submodule-maven-plugin:status\n```\n\n### `update`\n\nEquivalent to running `git submodule update --init --recursive`. Recursively initialises and updates all submodules in\nthe project. To use this goal in your build, write your plugin definition as follows:\n\n```xml\n\u003cplugin\u003e\n  \u003cgroupId\u003ech.usi.si.seart\u003c/groupId\u003e\n  \u003cartifactId\u003egit-submodule-maven-plugin\u003c/artifactId\u003e\n  \u003cversion\u003e1.1.1\u003c/version\u003e\n  \u003cexecutions\u003e\n    \u003cexecution\u003e\n      \u003cgoals\u003e\n        \u003cgoal\u003eupdate\u003c/goal\u003e\n      \u003c/goals\u003e\n    \u003c/execution\u003e\n  \u003c/executions\u003e\n\u003c/plugin\u003e\n```\n\nThe default execution `phase` of this goal is `initialize`, but you can change it according to your needs.\n\n## Configuration\n\nAt the moment, the plugin supports the following configuration options:\n\n| Configuration     | Default Value             | Description                                      |\n|-------------------|---------------------------|--------------------------------------------------|\n| `skip`            | `false`                   | Skips the execution of the plugin.               |\n| `verbose`         | `false`                   | Print additional execution information.          |\n| `dotGitDirectory` | `${project.basedir}/.git` | The path to the `.git` directory in the project. |\n\n## FAQ\n\n### How can I request a feature or ask a question?\n\nIf you have ideas for a feature that you would like to see implemented or if you have any questions, we encourage you to\ncreate a new [discussion](https://github.com/seart-group/git-submodule-maven-plugin/discussions). By initiating a discussion, you can engage with the community and our\nteam, and we will respond promptly to address your queries or consider your feature requests.\n\n### How can I report a bug?\n\nTo report any issues or bugs you encounter, create a [new issue](https://github.com/seart-group/git-submodule-maven-plugin/issues). Providing detailed information about\nthe problem you're facing will help us understand and address it more effectively. Rest assured, we're committed to\npromptly reviewing and responding to the issues you raise, working collaboratively to resolve any bugs and improve the\noverall user experience.\n\n### How do I contribute to the project?\n\nRefer to [CONTRIBUTING.md](/CONTRIBUTING.md) for more information.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseart-group%2Fgit-submodule-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseart-group%2Fgit-submodule-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseart-group%2Fgit-submodule-maven-plugin/lists"}