Maven зависимость с использованием более старой версии транзитивных зависимостей - PullRequest
0 голосов
/ 14 декабря 2018

Я пытаюсь использовать зависимость org.apache.camel:camel-spring:jar:2.23.0, и она mvn dependency:tree в пустом (демонстрационном) приложении maven:

[INFO] \- org.apache.camel:camel-spring:jar:2.23.0:compile
[INFO]    +- org.apache.camel:camel-core:jar:2.23.0:compile
[INFO]    |  \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO]    +- org.springframework:spring-core:jar:5.1.2.RELEASE:compile
[INFO]    |  \- org.springframework:spring-jcl:jar:5.1.2.RELEASE:compile
[INFO]    +- org.springframework:spring-aop:jar:5.1.2.RELEASE:compile
[INFO]    +- org.springframework:spring-context:jar:5.1.2.RELEASE:compile
[INFO]    +- org.springframework:spring-beans:jar:5.1.2.RELEASE:compile
[INFO]    +- org.springframework:spring-expression:jar:5.1.2.RELEASE:compile
[INFO]    +- org.springframework:spring-tx:jar:5.1.2.RELEASE:compile
[INFO]    +- com.sun.xml.bind:jaxb-core:jar:2.3.0:compile
[INFO]    \- com.sun.xml.bind:jaxb-impl:jar:2.3.0:compile

Однако в дочернем модуле моего основного приложения его дерево выглядит так::

[INFO] +- org.apache.camel:camel-spring:jar:2.23.0:compile
[INFO] |  +- org.springframework:spring-aop:jar:5.1.2.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:4.2.5.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:4.2.5.RELEASE:compile
[INFO] |  +- org.springframework:spring-expression:jar:5.1.2.RELEASE:compile
[INFO] |  \- org.springframework:spring-tx:jar:4.2.5.RELEASE:compile

Я не понимаю, почему он использует более старую версию spring-beans и другую, т.е. 4.2.5, где даже в моем основном приложении она должна была использовать версию 5.1.2.Справка?

Примечание: у дочернего модуля, в котором у меня возникают проблемы, есть родительский модуль, который использует Spring-Bean 4.2.5, но я не могу понять, почему Spring-Beans: 5.1.2 не получаетиспользуется, что является прямой зависимостью org.apache.camel:camel-spring:jar:2.23.0 здесь .

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...