apache / apache/maven

[MNG-6141] Dependency management overrides are not transitive and should be considered an anti-pattern.

Open
#7,300 17 comments 0 reactions 0 assignees View on GitHub
bug priority:critical
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 40m
Merged PRs (30d)
275

Description

**[Christian Schulte](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=schulte77)** opened **[MNG-6141](https://issues.apache.org/jira/browse/MNG-6141?redirect=false)** and commented

Overriding the dependency management in a module's `` section, the overridden value will not be preserved transitively. It makes no sense to be able to override the dependency management in a module if that is only effective in that module and nowhere else. Overriding the dependency management from inside a `` element should be considered an anti-pattern. Maven should provide a warning when it is used. During the development of Maven 3.4, there have been quite a few discussions on dev@ about build issues which were all caused by overriding the dependency management that way without noticing this is not supported transitively.

---

**Attachments:**
- [MNG-6141.zip](https://issues.apache.org/jira/secure/attachment/12845088/MNG-6141.zip) (_1.93 kB_)
- [MNG-6141-3.zip](https://issues.apache.org/jira/secure/attachment/12893717/MNG-6141-3.zip) (_2.52 kB_)

**Issue Links:**
- [MRESOLVER-33](https://issues.apache.org/jira/browse/MRESOLVER-33) New 'DefaultDependencyManager' managing dependencies on all levels supporting transitive dependency management
(_**"is blocked by"**_)

3 votes, 14 watchers

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.