Skip to content

Add BOM import scope enforcer rule#1

Merged
lithium147 merged 3 commits into
mainfrom
devin/1772664800-bom-import-scope-rule
Mar 5, 2026
Merged

Add BOM import scope enforcer rule#1
lithium147 merged 3 commits into
mainfrom
devin/1772664800-bom-import-scope-rule

Conversation

@lithium147

Copy link
Copy Markdown
Collaborator

Summary

Adds a custom Maven Enforcer rule (bomImportScopeRule) that ensures dependencies with type=pom (BOMs) always use scope=import.

What it checks

  • BOMs in <dependencies> are always flagged (they belong in <dependencyManagement> with scope=import)
  • BOMs in <dependencyManagement> without scope=import are flagged
  • Clear error messages listing all violations

Files added

  • BomImportScopeRule.java — the enforcer rule implementation in com.solubris.enforcer
  • BomImportScopeRuleTest.java — 9 unit tests covering all scenarios

Usage

<rules>
  <bomImportScopeRule />
</rules>

Link to Devin session: https://app.devin.ai/sessions/beab4575532748859e39706dd59d0848
Requested by: lithium147@gmail.com

devin-ai-integration Bot and others added 3 commits March 4, 2026 22:55
Implements a custom Maven Enforcer rule (bomImportScopeRule) that ensures
dependencies with type=pom (BOMs) always use scope=import.

- BOMs in <dependencies> are always flagged (they belong in dependencyManagement)
- BOMs in <dependencyManagement> without scope=import are flagged
- Clear error messages listing all violations
- Includes 9 unit tests covering all scenarios

Co-Authored-By: lithium147@gmail.com <lithium147@gmail.com>
Co-Authored-By: lithium147@gmail.com <lithium147@gmail.com>
@lithium147
lithium147 merged commit dddbe0a into main Mar 5, 2026
@lithium147
lithium147 deleted the devin/1772664800-bom-import-scope-rule branch March 5, 2026 01:24
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