{"id":24298145,"url":"https://github.com/chains-project/maven-module-graph","last_synced_at":"2026-05-26T13:46:14.628Z","repository":{"id":270900576,"uuid":"911792719","full_name":"chains-project/maven-module-graph","owner":"chains-project","description":"Listing and Counting Maven (sub)modules. ","archived":false,"fork":false,"pushed_at":"2025-07-24T17:13:12.000Z","size":132,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-10T00:39:17.376Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chains-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-01-03T21:33:41.000Z","updated_at":"2025-07-24T17:13:15.000Z","dependencies_parsed_at":"2025-07-24T19:09:43.794Z","dependency_job_id":"6346c620-a107-46c3-9f59-f3c43d814568","html_url":"https://github.com/chains-project/maven-module-graph","commit_stats":null,"previous_names":["algomaster99/maven-module-graph","chains-project/maven-module-graph"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chains-project/maven-module-graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chains-project%2Fmaven-module-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chains-project%2Fmaven-module-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chains-project%2Fmaven-module-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chains-project%2Fmaven-module-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chains-project","download_url":"https://codeload.github.com/chains-project/maven-module-graph/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chains-project%2Fmaven-module-graph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33523668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T03:12:49.672Z","status":"ssl_error","status_checked_at":"2026-05-26T03:12:47.976Z","response_time":63,"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":[],"created_at":"2025-01-16T20:53:59.845Z","updated_at":"2026-05-26T13:46:14.610Z","avatar_url":"https://github.com/chains-project.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# You will remember me when computing metrics for Java dataset\n\nCounting the number of Maven modules is a must-do if you are working on Java\nresearch.\nThis metric helps to assess the complexity of the projects selected for study.\n\nGoogling \"how to count maven module maven project\" resulted in the following \nStackOverflow post:\n\n#### [How to list active sub-modules in a Maven project?](https://stackoverflow.com/questions/3662291/how-to-list-active-sub-modules-in-a-maven-project)\n\nHowever, none of the solutions provided in the post worked for me well.\n\nLet's try current solutions on [handlebars.java v4.2.1](https://github.com/jknack/handlebars.java/tree/2afc50fd5dcd32af28f8305b59689b3fec4a3b07)\n\n### [Solution 1](https://stackoverflow.com/a/51824145/11751642)\n\n```shell\nmvn -Dexec.executable='echo' -Dexec.args='${project.artifactId}' exec:exec -q\n```\n\n\u003e TLDR: 1) maven based solutions are too slow 2) build must pass\n\nOutput:\n\n```txt\nhandlebars.java\nhandlebars\nhandlebars-helpers\nhandlebars-springmvc\nhandlebars-jackson2\nhandlebars-markdown\nhandlebars-humanize\nhandlebars-proto\nhandlebars-guava-cache\nhandlebars-maven-plugin\nhandlebars-maven-plugin-tests\n```\n\nTime:\n```text\nreal 4.30\nuser 17.33\nsys 1.06\n```\n\n### [Solution 2](https://stackoverflow.com/a/41766170/11751642)\n\n```shell\nfind -name pom.xml | grep -v target | sort\n```\n\n1. Great to count number of modules, but won't give GAV coordinates.\n2. Is prone to error since some `pom.xml` may not be part of reactor. Eg, [spoon](https://github.com/INRIA/spoon) has many modules\n  but they are not submodules.\n\nOthers did not work for me :) Please correct me if I am wrong.\n\n## Our solution\n\n```shell\n./gradlew build\njava -jar build/libs/maven-module-graph-1.0-SNAPSHOT.jar \\\n  --project-root \u003cpath/to/maven/project/root\u003e \\\n  --json \u003cpath/to/output.json\u003e \\\n  --plain-text \u003cpath/to/output.txt\u003e\n```\n\n\u003e TLDR: 1) extremely fast, 2) provides GAV coordinates, 3) provides a graph in JSON format\n\n\u003e I wanted to learn Gradle so I built using Gradle.\n\nOutput:\n\n```txt\ncom.github.jknack:handlebars.java:4.2.1\n  com.github.jknack:handlebars-maven-plugin-tests:4.2.1\n  com.github.jknack:handlebars-maven-plugin:4.2.1\n  com.github.jknack:handlebars-guava-cache:4.2.1\n  com.github.jknack:handlebars-proto:4.2.1\n  com.github.jknack:handlebars-humanize:4.2.1\n  com.github.jknack:handlebars-markdown:4.2.1\n  com.github.jknack:handlebars-jackson2:4.2.1\n  com.github.jknack:handlebars-springmvc:4.2.1\n  com.github.jknack:handlebars-helpers:4.2.1\n  com.github.jknack:handlebars:4.2.1\n```\n\nTime:\n```text\nreal 0.31\nuser 0.52\nsys 0.07\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchains-project%2Fmaven-module-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchains-project%2Fmaven-module-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchains-project%2Fmaven-module-graph/lists"}