Skip to content

Maven 4 stricter model validation rejects dependencies without <version> managed by BOM import #13190

Closed

Description

@gnodet

Summary

Maven 4 raises [ERROR] 'dependencies.dependency.version' for ... is missing during model validation for dependencies whose version is managed via a BOM (<scope>import</scope> in <dependencyManagement>). Maven 3 accepted these without error.

This causes build failures for projects that correctly rely on BOM-managed versions and omit explicit <version> declarations in their <dependencies> section.

Reproduction

Affected projects (found in maven4-testing rc-6 run):

Error (from mvnup / Maven 4 model validation)

[ERROR] 'dependencies.dependency.version' for groupId='org.apache.cassandra', artifactId='java-driver-test-infra', type='jar' is missing. @ line 42, column 5
[ERROR] 'dependencies.dependency.version' for groupId='org.apache.cassandra', artifactId='java-driver-query-builder', type='jar' is missing. @ line 47, column 5
[ERROR] 'dependencies.dependency.version' for groupId='org.apache.cassandra', artifactId='java-driver-mapper-processor', type='jar' is missing. @ line 52, column 5

Expected behavior

Dependencies whose version is managed by an imported BOM should not trigger validation errors. The BOM provides the version; the child POM correctly omits <version> per Maven best practice. Maven 3 accepted this pattern without error.

Notes

This may be a validation timing issue: the error occurs before the BOM import has been resolved and applied to dependencyManagement. If so, the fix would be to defer or suppress this validation until after BOM imports are resolved.

Alternatively, this could be intended stricter behavior — in which case the error message should clarify that the version must be provided in dependencyManagement (not necessarily inline), and the severity should be WARNING rather than ERROR for BOM-managed cases.

Maven version

Maven 4.0.0-rc-6 / maven-4.0.x branch

Activity

  1. added 11 commits that reference this issue on Sep 19, 2026
    7a86fa3
    3925eed
    f2f2611
    745cd58
    81e7eb3
    008826c
    32d2bb2
    460ae41
    c93393f
    f60767d
    33148fc
  2. added a commit that references this issue on Sep 19, 2026
    a98d8fa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions