Skip to content

Decouple Maven monorepo into independently buildable modules#24

Open
devin-ai-integration[bot] wants to merge 1 commit intotrunkfrom
devin/1774359086-decouple-maven-monorepo
Open

Decouple Maven monorepo into independently buildable modules#24
devin-ai-integration[bot] wants to merge 1 commit intotrunkfrom
devin/1774359086-decouple-maven-monorepo

Conversation

@devin-ai-integration
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot commented Mar 24, 2026

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:

  1. bom/pom.xml (new) — Centralizes all third-party and internal Struts module version declarations extracted from the root POM's <dependencyManagement>.
  2. build-parent/pom.xml (new) — Centralizes shared build configuration (<pluginManagement>, OSGi properties, active bundle-manifest plugin) extracted from the root POM. Imports the BOM.
  3. Root pom.xml — Stripped to a thin reactor aggregator. dependencyManagement, pluginManagement, shared <properties>, and the active OSGi plugin block are removed. bom and build-parent added as first two modules.

Every module POM now:

  • References struts-build-parent as its parent (with explicit <relativePath>)
  • Imports struts-bom in its own <dependencyManagement>
  • Uses ${struts.version} (set to 1.4.0-SNAPSHOT) for inter-module dependency versions instead of ${project.version}
  • Uses literal org.apache.struts groupId instead of ${project.groupId}

apps/faces-example2 is untouched (standalone Spring Boot project with its own parent).

Review & Testing Checklist for Human

  • core/pom.xml and mailreader-dao/pom.xml use ${project.version} for BOM import instead of ${struts.version} like all other modules. These two modules don't define struts.version at 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.xml removed explicit <version>${myfaces.version}</version> from the myfaces-impl dependency (line 73 in diff). This now relies on the BOM to manage that version. Verify the BOM actually manages myfaces-impl correctly and this doesn't break resolution.
  • Run mvn test from root — only mvn compile was verified. Dependency resolution differences may surface at test time (especially for modules with test-scoped deps managed by the BOM).
  • Verify BOM completeness — spot-check that bom/pom.xml contains every dependency that was in the root POM's <dependencyManagement> and that no version/exclusion/scope was lost in the extraction.
  • Verify build-parent/pom.xml completeness — confirm all <pluginManagement> entries, properties, and the active OSGi plugin config match what was in the root POM.

Recommended test plan: run mvn clean install from root (with -Dapps -Ddormant -Dassembly profiles active) to exercise the full reactor including profile-gated modules.

Notes

  • struts.version is hardcoded in each module POM individually. Future version bumps will require updating every module (or using a tool like versions:set). This is the expected trade-off for independent buildability.
  • The root POM's maven-antrun-plugin for copy-dtds now 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


Open with Devin

- 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>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant