{"id":16652071,"url":"https://github.com/jdcasey/monolith-maven-plugin","last_synced_at":"2025-07-17T00:05:52.794Z","repository":{"id":9493380,"uuid":"11384433","full_name":"jdcasey/monolith-maven-plugin","owner":"jdcasey","description":"Apache Maven plugin that creates essentially self-contained versions of existing dependencies and plugins using specifications in dependencyManagement and pluginManagement of another POM","archived":false,"fork":false,"pushed_at":"2013-08-07T15:26:45.000Z","size":184,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-13T10:49:06.270Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdcasey.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}},"created_at":"2013-07-13T07:07:08.000Z","updated_at":"2014-02-23T13:25:03.000Z","dependencies_parsed_at":"2022-09-06T02:42:22.005Z","dependency_job_id":null,"html_url":"https://github.com/jdcasey/monolith-maven-plugin","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/jdcasey/monolith-maven-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdcasey%2Fmonolith-maven-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdcasey%2Fmonolith-maven-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdcasey%2Fmonolith-maven-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdcasey%2Fmonolith-maven-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdcasey","download_url":"https://codeload.github.com/jdcasey/monolith-maven-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdcasey%2Fmonolith-maven-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265553192,"owners_count":23787032,"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":"2024-10-12T09:27:30.569Z","updated_at":"2025-07-17T00:05:52.758Z","avatar_url":"https://github.com/jdcasey.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monolith Plugin for Apache Maven\n\nThis plugin reads the entries in your POM's `dependencyManagement` and `pluginManagement` sections, and generates monolithic, self-contained assemblies for each. That is, self-contained EXCEPT when they reference other monoliths declared in the current project. In the case of plugins, these assemblies are usable as drop-in replacements for the original plugin...just adjust the version to the new, qualified version, and away you go.\n\n## Why??\n\nIn cleanroom environments, it's often desirable to avoid mixing built-time / toolchain libraries with the libraries you're building. When you're doing Maven builds, it's not enough to simply keep track of the plugins you're using. Each plugin has its own dependency graph, and if that graph overlaps with something you're trying to build and ship, it can cause a chicken-and-egg scenario that makes it hard to guarantee that what you're shipping is actually the code that you built, and not something you imported for the sake of supporting a plugin.\n\nThis is where monoliths come in handy. By creating self-contained plugins (and other libraries used during a Maven build), you avoid questions of dependency-graph overlap.\n\n## How To Use\n\nImagine you want to create a self-contained version of the Maven Archetype Plugin. However, since you want to manage the archetypes you're planning on shipping, you actually need a self-contained version of the `archetype-packaging` artifact. It's possible this artifact is already self-contained...for the purposes of this example, assume it's not.\n\nSimply create a new Maven project, and in the pom.xml add this:\n\n    \u003cdependencyManagement\u003e\n      \u003cdependencies\u003e\n        \u003cdependency\u003e\n          \u003cgroupId\u003eorg.apache.maven.archetype\u003c/groupId\u003e\n          \u003cartifactId\u003earchetype-packaging\u003c/artifactId\u003e\n          \u003cversion\u003e2.2\u003c/version\u003e\n        \u003c/dependency\u003e\n      \u003c/dependencies\u003e\n    \u003c/dependencyManagement\u003e\n\n    \u003cbuild\u003e\n      \u003cpluginManagement\u003e\n        \u003cplugins\u003e\n          \u003cplugin\u003e\n            \u003cartifactId\u003emaven-archetype-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e2.2\u003c/version\u003e\n          \u003c/plugin\u003e\n        \u003c/plugins\u003e\n      \u003c/pluginManagement\u003e\n    \u003c/build\u003e\n\nThen, issue the following:\n\n    mvn org.commonjava.maven.plugins:monolith-maven-plugin:create\n\nWhen Maven finishes, the basic output (i.e. monolithic artifacts + poms) will be in the `target/monoliths` directory. Additionally, the plugin generates a partial local repository (by `install`ing these artifacts and POMs) in `target/installed`. It also generates a partial remote repository (by `deploy`'ing these artifacts and POMs) in `target/deployed`.\n\n## Making That Last Call Simpler\n\nIf you want to simplify the Maven command line you must run, try adding the following to your `settings.xml`:\n\n    \u003cpluginGroups\u003e\n      \u003cpluginGroup\u003eorg.commonjava.maven.plugins\u003c/pluginGroup\u003e\n    \u003c/pluginGroups\u003e\n\nThen, the command you must issue becomes:\n\n    mvn monolith:create\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdcasey%2Fmonolith-maven-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdcasey%2Fmonolith-maven-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdcasey%2Fmonolith-maven-plugin/lists"}