Maven中的dependencyManagement

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# pom.xml
# 只是对版本进行管理,不会实际引入jar包
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.2.7</version>
</dependency>
</dependencies>
</dependencyManagement>
# 实际下载jar包
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
</dependencies>