1.版本统一管理
要实现jar的版本统一管理需要对jar的版本进行设置即,如下是一段版本控制的以来配置:
.................
org.apache.shiro
shiro-all
${org.apache.shiro.version}
org.hibernate
hibernate
${org.hibernate.version}
org.hibernate
hibernate-core
${org.hibernate.version}
org.hibernate
hibernate-ehcache
${org.hibernate.version}
org.hibernate
hibernate-annotations
3.4.0.GA
org.hibernate
hibernate-c3p0
${org.hibernate.version}
org.hibernate
hibernate-entitymanager
${org.hibernate.version}
org.springframework
spring-core
${org.springframework.version}
........................
2.设置版本属性
1.中的的配置均是采用${*.version}的配置的,光这样配置还不能找到具体使用哪个版本的,所以必须在pom.xml中用属性定义这些版本的确切值。配置如下:
3.1.0
1.2.3
3.6.10.Final
3.0.2.RELEASE
注意:key要与引用的key保持一致。