Maven工件:x(从y管理) [英] maven artifact : x (managed from y)

查看:51
本文介绍了Maven工件:x(从y管理)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实际上期望通过项目中的传递依赖项实现powermock版本1.5.6,但我只有1.4.11.这是什么意思?

I actually was expecting powermock version 1.5.6 via transitive dependencies in a project, but i get only 1.4.11. What does this mean?

推荐答案

在解决依赖项时,相对于从依赖项和传递性依赖关系解析的版本,Maven将更喜欢POM部分中指定的版本.

When resolving dependencies, Maven will prefer a version specified in the POM's section over the version resolved from dependencies and transitive dependencies.

请注意,可以从父POM继承.

Note that can be inherited from a parent POM.

有关依赖机制的信息,请参见Maven文档.更多信息.

See the Maven documentation on Dependency Mechanism for more info.

具体来说,请检查从下面开始的页面部分,以获取详细说明.

Specifically, check the part of the page that starts as below for a detailed explanation.

依赖性管理部分的第二个也是非常重要的用途用于控制在传递中使用的工件的版本依赖关系.作为示例,请考虑以下项目:

A second, and very important use of the dependency management section is to control the versions of artifacts used in transitive dependencies. As an example consider these projects:

这篇关于Maven工件:x(从y管理)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆