Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Хотя я и сомневаюсь что стоит дублировать абсолютно все пакеты (это встречается в экосистеме Maven для Java)maven приносит только одну версию каждой зависимости. Базовое описание: maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html.
The comment was based on the existence of this Maven rule:
maven.apache.org/enforcer/enforcer-rules/dependencyConvergence.html
which seems to imply that A and B can depend on different versions of C.
I could certainly believe that by default Maven makes everything
default, I haven't used it for any big projects.
Edward
Dependency mediation — this determines what version of a dependency will be used when multiple versions of an artifact are encountered. Currently, Maven 2.0 only supports using the «nearest definition» which means that it will use the version of the closest dependency to your project in the tree of dependencies. You can always guarantee a version by declaring it explicitly in your project's POM. Note that if two dependency versions are at the same depth in the dependency tree, until Maven 2.0.8 it was not defined which one would win, but since Maven 2.0.9 it's the order in the declaration that counts: the first declaration wins.
- «nearest definition» means that the version used will be the closest one to your project in the tree of dependencies, eg. if dependencies for A, B, and C are defined as A -> B -> C -> D 2.0 and A -> E -> D 1.0, then D 1.0 will be used when building A because the path from A to D through E is shorter. You could explicitly add a dependency to D 2.0 in A to force the use of D 2.0
Фундаментальная проблема пакетных менеджеров для языков программирования