Skip to content

Improve reactor BOM import warning: add coordinates and explain actual risk - #13264

Merged
gnodet merged 1 commit into
apache:masterfrom
gnodet:improve/bom-reactor-warning
Oct 14, 2026
Merged

gnodet merged 1 commit into
apache:masterfrom
gnodet:improve/bom-reactor-warning

Conversation

@gnodet

@gnodet gnodet commented Sep 24, 2026

Copy link
Copy Markdown
Contributor

The existing warning message "BOM imports from within reactor should be avoided" is opaque: it doesn't identify which BOM triggered it, doesn't explain why, and gives no actionable guidance.

This PR improves the message to:

  • Include the BOM coordinates (g:a:v) so the user knows which import is affected
  • Explain the actual risk: the BOM is evaluated in CONSUMER_DEPENDENCY mode, which skips conditional profile activation (file/property/condition activations), potentially producing an incomplete dependencyManagement compared to the BOM's own BUILD_PROJECT build
  • Suggest the preferred alternative (parent POM inheritance)

Example new message:

[WARNING] BOM import 'org.jdbi.internal:test-bom:1-SNAPSHOT' references a module within the same reactor. The BOM will be evaluated without conditional profile activation (file/property/condition), which may produce an incomplete dependencyManagement compared to the BOM's own build. Prefer parent POM inheritance for intra-reactor version management.

Note: the ordering issue that was the main practical concern (BOM excluded from -am subset) is now fixed by #13040.

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Solid. Warning message now includes BOM coordinates and explains the actual risk (CONSUMER_DEPENDENCY mode skipping conditional profile activation). No logic change, correct API usage, technically accurate description.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

@gnodet
gnodet requested a review from cstamas October 8, 2026 11:33

@cstamas cstamas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

and maybe "... and generated BOMs for downstream consumption"

@gnodet gnodet added enhancement New feature or request mvn4 labels Oct 14, 2026
…al risk

- Add BOM coordinates (g:a:v) to the warning so the user knows which import is affected
- Explain the actual risk: BOM is evaluated in CONSUMER_DEPENDENCY mode, which skips
  conditional profile activation (file/property/condition), potentially producing an
  incomplete dependencyManagement compared to the BOM's own build
- Suggest parent POM inheritance as the preferred alternative
- Mention that downstream consumers of the BOM may be affected as well
@gnodet
gnodet force-pushed the improve/bom-reactor-warning branch from 9178dd0 to 50f842e Compare October 14, 2026 14:26
@gnodet gnodet added the java Pull requests that update Java code label Oct 14, 2026
@gnodet
gnodet merged commit 622904a into apache:master Oct 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request java Pull requests that update Java code mvn4

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants