标签:style java color 使用 os strong io art
要实现jar的版本统一管理需要对jar的版本进行设置即<version></version>,如下是一段版本控制的以来配置:
<dependencies> ................. <dependency> <groupId>org.apache.shiro</groupId> <artifactId>shiro-all</artifactId> <version>${org.apache.shiro.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate</artifactId> <version>${org.hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> <version>${org.hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-ehcache</artifactId> <version>${org.hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-annotations</artifactId> <version>3.4.0.GA</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-c3p0</artifactId> <version>${org.hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>${org.hibernate.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${org.springframework.version}</version> </dependency> ........................ </dependencies>
1.中的<version></version>的配置均是采用${*.version}的配置的,光这样配置还不能找到具体使用哪个版本的,所以必须在pom.xml中用属性定义这些版本的确切值。配置如下:
<!-- 配置可变版本号 (Hibernate、spring、shiro) --> <properties> <javax.servlet.version>3.1.0</javax.servlet.version> <org.apache.shiro.version>1.2.3</org.apache.shiro.version> <org.hibernate.version>3.6.10.Final</org.hibernate.version> <org.springframework.version>3.0.2.RELEASE</org.springframework.version> <developer.organization><![CDATA[scengine]]></developer.organization> </properties>
注意:key要与引用的key保持一致。
Maven 实现依赖框架jar包的版本管理,布布扣,bubuko.com
标签:style java color 使用 os strong io art
原文地址:http://my.oschina.net/boonya/blog/294427