Decouple Maven monorepo into independently buildable modules#24
Open
devin-ai-integration[bot] wants to merge 1 commit intotrunkfrom
Open
Decouple Maven monorepo into independently buildable modules#24devin-ai-integration[bot] wants to merge 1 commit intotrunkfrom
devin-ai-integration[bot] wants to merge 1 commit intotrunkfrom
Conversation
- Create bom/pom.xml with centralized dependencyManagement (all third-party and internal module versions)
- Create build-parent/pom.xml with shared pluginManagement, properties, and OSGi config
- Update all module POMs to reference struts-build-parent with explicit relativePath
- Import struts-bom in each module's dependencyManagement
- Replace all ${project.version} inter-module references with ${struts.version} property
- Refactor root pom.xml to thin reactor aggregator (removed dependencyManagement, pluginManagement, shared properties)
- Add bom and build-parent as first two reactor modules
Co-Authored-By: Jack Meigel <jack.meigel@cognition.ai>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restructures the Maven multi-module build so that each module can be built independently (given published dependencies) rather than requiring the full reactor. Three structural changes:
bom/pom.xml(new) — Centralizes all third-party and internal Struts module version declarations extracted from the root POM's<dependencyManagement>.build-parent/pom.xml(new) — Centralizes shared build configuration (<pluginManagement>, OSGi properties, active bundle-manifest plugin) extracted from the root POM. Imports the BOM.pom.xml— Stripped to a thin reactor aggregator.dependencyManagement,pluginManagement, shared<properties>, and the active OSGi plugin block are removed.bomandbuild-parentadded as first two modules.Every module POM now:
struts-build-parentas its parent (with explicit<relativePath>)struts-bomin its own<dependencyManagement>${struts.version}(set to1.4.0-SNAPSHOT) for inter-module dependency versions instead of${project.version}org.apache.strutsgroupId instead of${project.groupId}apps/faces-example2is untouched (standalone Spring Boot project with its own parent).Review & Testing Checklist for Human
core/pom.xmlandmailreader-dao/pom.xmluse${project.version}for BOM import instead of${struts.version}like all other modules. These two modules don't definestruts.versionat all. This is inconsistent and means they are less decoupled — in a standalone build, the BOM version is tied to the module's own version. Verify this is acceptable or should be aligned.apps/faces-example1/pom.xmlremoved explicit<version>${myfaces.version}</version>from themyfaces-impldependency (line 73 in diff). This now relies on the BOM to manage that version. Verify the BOM actually managesmyfaces-implcorrectly and this doesn't break resolution.mvn testfrom root — onlymvn compilewas verified. Dependency resolution differences may surface at test time (especially for modules with test-scoped deps managed by the BOM).bom/pom.xmlcontains every dependency that was in the root POM's<dependencyManagement>and that no version/exclusion/scope was lost in the extraction.build-parent/pom.xmlcompleteness — confirm all<pluginManagement>entries, properties, and the active OSGi plugin config match what was in the root POM.Recommended test plan: run
mvn clean installfrom root (with-Dapps -Ddormant -Dassemblyprofiles active) to exercise the full reactor including profile-gated modules.Notes
struts.versionis hardcoded in each module POM individually. Future version bumps will require updating every module (or using a tool likeversions:set). This is the expected trade-off for independent buildability.maven-antrun-pluginforcopy-dtdsnow has an inline<version>1.3</version>since it can no longer inherit from the removed<pluginManagement>.Link to Devin session: https://jack-meigel.devinenterprise.com/sessions/470b1c820cdd40e5a5927b57dc9dc395
Requested by: @cogjack