<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.tipdm</groupId>
	<artifactId>tipdmframework-root</artifactId>
	<version>1.0</version>
	<packaging>pom</packaging>
	<name>tipdmframework-root</name>

	<modules>
		<module>framework-common</module>
		<module>framework-model</module>
		<module>framework-persist</module>
		<module>framework-service</module>
		<module>tipdm-server</module>

    </modules>

	<properties>

        <!-- 主要依赖库的版本定义 -->
		<spring.version>4.3.4.RELEASE</spring.version>
		<hibernate.version>5.1.0.Final</hibernate.version>
		<spring-data-jpa.version>1.6.0.RELEASE</spring-data-jpa.version>
		<tomcat-jdbc.version>8.0.32</tomcat-jdbc.version>
		<shiro.version>1.2.3</shiro.version>
		<hibernate-validator.version>5.0.3.Final</hibernate-validator.version>
		<jackson.version>2.7.4</jackson.version>
		<aspectj.version>1.7.4</aspectj.version>
		<slf4j.version>1.7.7</slf4j.version>
		<logback.version>1.2.3</logback.version>
		<commons-lang3.version>3.6</commons-lang3.version>
		<commons-io.version>2.4</commons-io.version>
		<commons-pool2.version>2.4.2</commons-pool2.version>
		<commons-configuration.version>1.6</commons-configuration.version>
		<guava.version>17.0</guava.version>
		<junit.version>4.12</junit.version>
		<assertj.version>1.6.1</assertj.version>
		<mockito.version>1.9.5</mockito.version>
		<selenium.version>2.42.2</selenium.version>
		<jetty.version>8.1.16.v20140903</jetty.version>
		<h2.version>1.4.192</h2.version>
		<quartz.version>2.2.1</quartz.version>
		<postgresql.version>9.4.1211</postgresql.version>
		<spring-data-redis.version>1.6.2.RELEASE</spring-data-redis.version>
		<redis.version>2.9.0</redis.version>
		<druid.version>1.1.6</druid.version>

		<!--编译环境-->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<java.version>1.8</java.version>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>

	</properties>

	<prerequisites>
		<maven>3.0.0</maven>
	</prerequisites>

	<dependencies>
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<version>2.9.3</version>
		</dependency>

		<!-- PERSISTENCE begin -->
		<!-- hibernate -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
			<version>${hibernate.version}</version>
		</dependency>
		
		<dependency>
		    <groupId>javax.transaction</groupId>
		    <artifactId>jta</artifactId>
		    <version>1.1</version>
		</dependency>

		<dependency>
		    <groupId>javax.transaction</groupId>
		    <artifactId>javax.transaction-api</artifactId>
		    <version>1.2</version>
		</dependency>

		<!-- Quartz framework -->
		<dependency>
			<groupId>org.quartz-scheduler</groupId>
			<artifactId>quartz</artifactId>
			<version>${quartz.version}</version>
		</dependency>

		<!-- spring data access -->
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-jpa</artifactId>
			<version>${spring-data-jpa.version}</version>
		</dependency>

		<!-- spring aop -->
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjrt</artifactId>
			<version>${aspectj.version}</version>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>${aspectj.version}</version>
			<scope>runtime</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-core</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-web</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-ehcache</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-spring</artifactId>
			<version>${shiro.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.shiro</groupId>
			<artifactId>shiro-quartz</artifactId>
			<version>${shiro.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.quartz-scheduler</groupId>
					<artifactId>quartz</artifactId>
				</exclusion>
				<exclusion>
					<artifactId>quartz</artifactId>
					<groupId>org.opensymphony.quartz</groupId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- postgresql driver -->
		<dependency>
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
			<version>${postgresql.version}</version>
		</dependency>
		<!-- jdbc driver end-->

		<!-- PERSISTENCE end -->

		<!-- redis -->
		<dependency>
			<groupId>org.springframework.data</groupId>
			<artifactId>spring-data-redis</artifactId>
			<version>${spring-data-redis.version}</version>
		</dependency>

		<dependency>
			<groupId>redis.clients</groupId>
			<artifactId>jedis</artifactId>
			<version>${redis.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
		</dependency>

		<!-- WEB begin -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>1.2</version>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.0.1</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>commons-validator</groupId>
			<artifactId>commons-validator</artifactId>
			<version>1.5.1</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>javax.ws.rs-api</artifactId>
			<version>2.0.1</version>
		</dependency>

		<!-- WEB end -->

		<!-- SECURITY begin -->
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>1.9</version>
		</dependency>
		<!-- SECURITY end -->

		<!-- JSR303 BeanValidator -->
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>${hibernate-validator.version}</version>
		</dependency>

		<!-- JSON begin -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.module</groupId>
			<artifactId>jackson-module-jaxb-annotations</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		<!-- JSON end -->

		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>druid</artifactId>
			<version>${druid.version}</version>
		</dependency>
		<dependency>
			<groupId>com.alibaba</groupId>
			<artifactId>fastjson</artifactId>
			<version>1.2.7</version>
		</dependency>

		<!-- LOGGING begin -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<version>${logback.version}</version>
		</dependency>

		<!-- LOGGING end -->

		<!-- GENERAL UTILS begin -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>${commons-lang3.version}</version>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>${commons-io.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-pool2</artifactId>
			<version>${commons-pool2.version}</version>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>${guava.version}</version>
		</dependency>

		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<version>3.2</version>
		</dependency>

		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>${h2.version}</version>
		</dependency>

		<dependency>
			<groupId>commons-configuration</groupId>
			<artifactId>commons-configuration</artifactId>
			<version>${commons-configuration.version}</version>
		</dependency>
		<!-- GENERAL UTILS end -->

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>${assertj.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>${mockito.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- TEST end -->

	</dependencies>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-framework-bom</artifactId>
				<version>${spring.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>net.sf.ehcache</groupId>
				<artifactId>ehcache-core</artifactId>
				<version>2.6.9</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<!-- compiler插件, 设定JDK版本 -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.1</version>
					<configuration>
						<source>${java.version}</source>
						<target>${java.version}</target>
						<showWarnings>true</showWarnings>
					</configuration>
				</plugin>

				<!-- war打包插件, 设定war包名称不带版本号 -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-war-plugin</artifactId>
					<version>2.4</version>
					<configuration>
						<warName>${project.artifactId}</warName>
					</configuration>
				</plugin>

				<!-- test插件, 仅测试名称为*Test的类,使用支持分组测试的surefire-junit47 driver -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.16</version>
					<configuration>
						<includes>
							<include>**/*Test.java</include>
						</includes>
						<argLine>-Xmx256M</argLine>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>org.apache.maven.surefire</groupId>
							<artifactId>surefire-junit47</artifactId>
							<version>2.16</version>
						</dependency>
					</dependencies>
				</plugin>


				<!-- cobertura插件, 设置不需要计算覆盖率的类 -->
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>cobertura-maven-plugin</artifactId>
					<version>2.6</version>
					<configuration>
						<instrumentation>
							<excludes>
								<exclude>**/entity/**/*.class</exclude>
								<exclude>**/*Controller.class</exclude>
							</excludes>
						</instrumentation>
					</configuration>
				</plugin>

				<!-- enforcer插件, 避免被依赖的依赖引入过期的jar�? -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>1.3.1</version>
					<executions>
						<execution>
							<id>enforce-banned-dependencies</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<requireMavenVersion>
										<version>3.0.3</version>
									</requireMavenVersion>
									<requireJavaVersion>
										<version>1.6</version>
									</requireJavaVersion>
									<bannedDependencies>
										<searchTransitive>true</searchTransitive>
										<excludes>
											<exclude>commons-logging</exclude>
											<exclude>aspectj:aspectj*</exclude>
											<exclude>org.springframework</exclude>
										</excludes>
										<includes>
											<include>org.springframework:*:4.0.*</include>
										</includes>
									</bannedDependencies>
								</rules>
								<fail>true</fail>
							</configuration>
						</execution>
					</executions>
				</plugin>

				<!-- resources插件 -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>2.6</version>
				</plugin>

				<!-- install插件 -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>2.5.1</version>
				</plugin>

			</plugins>
		</pluginManagement>
	</build>

</project>