Skip to content

docs: correct non-existent bomClassifier element in What's new in Maven 4 - #1630

Open
arimu1 wants to merge 2 commits into
apache:masterfrom
arimu1:docs/12661-fix-bomClassifier-reference
Open

docs: correct non-existent bomClassifier element in What's new in Maven 4#1630
arimu1 wants to merge 2 commits into
apache:masterfrom
arimu1:docs/12661-fix-bomClassifier-reference

Conversation

@arimu1

@arimu1 arimu1 commented Aug 5, 2026

Copy link
Copy Markdown

Summary

Fixes apache/maven#12661.

The What's new in Maven 4 page claimed that project BOMs should be generated using a <bomClassifier> element. That element does not exist in the Maven 4.1.0 model or XSD, and there is no example of how to use it.

Investigation

Claim Reality
<bomClassifier> POM element Does not exist in maven.mdo / XSD 4.1.0
Import BOM with classifier Supported for model 4.1.0+ via standard dependency <classifier> (validator skips the "must be empty" rule when is41OrBeyond)
Generating classified BOMs Done by attaching an additional POM artifact with a classifier (e.g. plugin config such as bom-builder3's bomClassifier parameter) — not a model element

This is a documentation correctness fix only (no model/XSD change).

Changes

  • Replace the false <bomClassifier> reference with the real import syntax using <classifier>
  • Add a short import example
  • Clarify that classified BOMs are attached artifacts, not a POM model element
  • Keep the existing guidance about importing only external (non-reactor) BOMs

Testing

  • Docs-only change; no code build required
  • Reviewed against DefaultModelValidator (classifier allowed for import scope when model ≥ 4.1.0) and confirmed no bomClassifier field in api/maven-api-model

Checklist

The page referred to a non-existent <bomClassifier> POM element.
Model version 4.1.0 allows import-scoped dependencies to carry a
standard <classifier>; classified BOMs are attached artifacts, not a
model element. Add an import example and drop the false XSD claim.

Fixes apache/maven#12661
Comment thread content/markdown/whatsnewinmaven4.md Outdated
</dependencyManagement>
```

There is no dedicated `<bomClassifier>` element in the POM model or XSD.

@elharo elharo Aug 9, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

don't tell us what doesn't exist. There's an infinite number of things that don't exist

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks @elharo — good call.

Rewrote that note to state only the correct behavior: classified BOM artifacts are attached with a classifier (e.g. via a BOM-building plugin), and consumers import them with the standard <classifier> element as in the example above. Removed the “what doesn’t exist” phrasing.

Drop the negative claim about a missing element; describe only how
classified BOMs are produced and imported via standard <classifier>.
@arimu1

arimu1 commented Aug 11, 2026

Copy link
Copy Markdown
Author

Addressed @elharo’s review: the BOM note now describes only how classified BOMs are produced and imported via standard <classifier>, without saying what elements do not exist.

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.

Documented bomClassifier - No reference in XSD / Example description

2 participants