java – 没有版本的maven依赖关系

最近我一直在开发一些前期开发的项目的一些改进,这就是我发现的. pom文件中的许多依赖关系没有指定版本,但它们已被解析.该项目由1个根模块和2个子模块组成.使用聚合器模式,意味着没有依赖管理部分.上层项目简单地聚合了2个模块,这就是它所做的一切.子项目不涉及父母.他们有不同的父母.我不能理解的是,子项目本身和它们的父项(实际上它没有dependencyManagement也不是)指定一些依赖关系的版本.例如:
<dependency>
    <groupId>javax.mail</groupId>
    <artifactId>javax.mail-api</artifactId>
</dependency>
<dependency>
    <groupId>com.sun.mail</groupId>
    <artifactId>javax.mail</artifactId>
</dependency>
<dependency>
    <groupId>com.sun.mail</groupId>
    <artifactId>imap</artifactId>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>jcl-over-slf4j</artifactId>
</dependency>
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>jul-to-slf4j</artifactId>
</dependency>
<dependency>
    <groupId>ch.qos.logback</groupId>
    <artifactId>logback-classic</artifactId>
</dependency>

有人可以帮我弄清楚吗?似乎maven处理版本控制与一些认策略.

解决方法

好的,我想我会自己回答.当然,我看了依赖:树,但是我提到的所有依赖关系,树的第一级成员.我立即没有注意到,dependencyManagement不存在于父项中,但是它存在于子模块中,它包含的更有趣的是:
<dependency>
            <groupId>io.spring.platform</groupId>
            <artifactId>platform-bom</artifactId>
            <version>1.0.2.RELEASE</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>

我以前从来没有使用过Spring IO Platform,所以这对我来说是一个全新的概念.事实证明,该平台包含了很多预配置的依赖项:
http://docs.spring.io/platform/docs/current/reference/htmlsingle/#appendix-dependency-versions

相关文章

最近看了一下学习资料,感觉进制转换其实还是挺有意思的,尤...
/*HashSet 基本操作 * --set:元素是无序的,存入和取出顺序不...
/*list 基本操作 * * List a=new List(); * 增 * a.add(inde...
/* * 内部类 * */ 1 class OutClass{ 2 //定义外部类的成员变...
集合的操作Iterator、Collection、Set和HashSet关系Iterator...
接口中常量的修饰关键字:public,static,final(常量)函数...