Skip to content

Consumer POM: keep only transitive dependencies; drop non-transitive scopes #11162

@gnodet

Description

@gnodet

Context:
Maven 4 introduces refined dependency scopes and a consumer POM generator that attempts to create a Maven 3-consumable POM. We need to align consumer POM generation with scope transitivity semantics.

Proposal:

  • When generating the consumer POM for non-POM artifacts, keep only dependencies whose scopes are transitive according to org.apache.maven.api.DependencyScope#isTransitive (default/null scope treated as COMPILE).
  • Drop non-transitive scopes (e.g., compile-only, test-only, provided, system, none, import, test, etc.).
  • This replaces the previous special-case mapping logic and simplifies behavior: consumer POM expresses only transitive dependencies.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions