{"id":26154656,"url":"https://github.com/patrickdoc/auto-cluster-maven-plugin","last_synced_at":"2025-04-14T07:21:48.639Z","repository":{"id":57539875,"uuid":"382508549","full_name":"patrickdoc/auto-cluster-maven-plugin","owner":"patrickdoc","description":"Hierarchical cluster of Java source files in a convenient Maven plugin","archived":false,"fork":false,"pushed_at":"2022-08-20T14:28:41.000Z","size":1634,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T21:03:26.219Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/patrickdoc.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}},"created_at":"2021-07-03T02:38:15.000Z","updated_at":"2022-08-21T13:55:08.000Z","dependencies_parsed_at":"2022-09-26T18:31:00.240Z","dependency_job_id":null,"html_url":"https://github.com/patrickdoc/auto-cluster-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickdoc%2Fauto-cluster-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickdoc%2Fauto-cluster-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickdoc%2Fauto-cluster-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickdoc%2Fauto-cluster-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickdoc","download_url":"https://codeload.github.com/patrickdoc/auto-cluster-maven-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837188,"owners_count":21169379,"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":[],"created_at":"2025-03-11T08:32:53.011Z","updated_at":"2025-04-14T07:21:48.600Z","avatar_url":"https://github.com/patrickdoc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# auto-cluster-maven-plugin\n\nExtract Java dependency information, run a hierarchical clustering algorithm,\norganize your code.\n\n## Usage\n\nTo generate a dry-run folder: `src/main/auto-cluster-maven-plugin1234...`\n\n```bash\nmvn io.github.patrickdoc:auto-cluster-maven-plugin:cluster\n```\n\nTo delete your existing structure and fully embrace the plugin\n\n\u003e :warning: **WARNING**: This will delete your existing files. Please be very\n\u003e careful, and also use version control.\n\n```bash\nmvn io.github.patrickdoc:auto-cluster-maven-plugin:cluster -DdryRun=false\n```\n\n## Why?\n\nI think dependencies are an under-examined aspect of code and we can do a lot\nmore with them.\n\nThis plugin has two goals:\n\n- For individual projects, the goal is to make\nthe internal dependency structure easy to analyze. By putting it front and\ncenter, you will hopefully be able to identify and resolve potential structural\nissues in your code.\n\n- For the general community, the goal is to provide a language for talking about\ncode organization and style.\n\nI don't like organizing interfaces into an `inf` package or enums into an `enum`\npackage, but there is no productive conversation we can have about that.\n\nOn the other hand, if you submit a pull request to increase the effect of\ntransitive dependencies on the clustering algorithm, then we can look at\nconcrete examples of how it would work on any codebase. This seems like a much\nbetter starting point than \"I don't like X\".\n\nFor a longer form dev log and discussion, see\n[here](https://patrickdoc.github.io/dependencies.html).\n\n## Example\n\nThe ClassGraph repo is as good an example of any of medium sized project with\nnon-zero complexity in the code. So I've used it as an example here. Note, this\nis not a criticism of the existing structure. In fact, I'm quite pleased that\nthe plugin reproduces some of the existing structure.\n\nRunning a dry run in the ClassGraph repo (with a parameter to handle multiple base packages):\n\n```bash\nmvn io.github.patrickdoc:auto-cluster-maven-plugin:cluster -DbasePackages=io.github.classgraph,nonapi.io.github.classgraph\n```\n\nYou can see a side by side comparison of the original repo:\n\n\u003cimg alt=\"Original ClassGraph source\"\nsrc=\"https://github.com/patrickdoc/auto-cluster-maven-plugin/blob/master/imgs/classgraph.png\"\u003e\n\nand the clustered code:\n\u003cimg alt=\"Clustered ClassGraph source\"\nsrc=\"https://github.com/patrickdoc/auto-cluster-maven-plugin/blob/master/imgs/classgraph-cluster.png\"\u003e\n\nYou can also browse the files in [this fork](https://github.com/patrickdoc/classgraph/tree/clustered/src/main).\n\n## Acknowledgements and References\n\n[ClassGraph](https://github.com/classgraph/classgraph): This project powers the\ndependency data extraction, but can also do much more\n\n[Hierarchical Clustering Primer](https://uc-r.github.io/hc_clustering): A useful\nintroduction to hierarchical clustering\n\n[Clustering Algorithm](https://arxiv.org/pdf/1109.2378.pdf): The base algorithm\nfor clustering, available in Python and R packages as `fastcluster`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickdoc%2Fauto-cluster-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickdoc%2Fauto-cluster-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickdoc%2Fauto-cluster-maven-plugin/lists"}