<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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>tk.hongkailiu</groupId>
  <artifactId>test-java</artifactId>
  <version>0.0.2</version>
  <packaging>pom</packaging>
	<description>Java Playground</description>
  <name>test-java</name>
  <url>http://maven.apache.org</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
		</license>
	</licenses>

	<profiles>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<executable>gpg</executable>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<developers>
		<developer>
			<name>Hongkai Liu</name>
			<url>http://www.hongkailiu.tk</url>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:hongkailiu/test-java.git</connection>
		<developerConnection>scm:git:git@github.com:hongkailiu/test-java.git</developerConnection>
		<url>git@github.com:hongkailiu/test-java.git</url>
	</scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!-- <spring.version>3.2.8.RELEASE</spring.version> -->
	  <spring.version>4.1.6.RELEASE</spring.version>
    <log4j.version>1.2.17</log4j.version>
    <java.version>1.8</java.version>
    <jackson.version>1.8.8</jackson.version>
    <surefire.version>2.18.1</surefire.version>
	  <powermock.version>1.6.2</powermock.version>
	  <!-- Sonar -->
	  <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
	  <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
	  <sonar.jacoco.reportPath>${project.basedir}/target/jacoco.exec</sonar.jacoco.reportPath>
	  <plugin.jacoco.version>0.7.4.201502262128</plugin.jacoco.version>
  </properties>

  <dependencies>
	<dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>4.11</version>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>com.h2database</groupId>
		<artifactId>h2</artifactId>
		<version>1.4.185</version>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>org.springframework</groupId>
		<artifactId>spring-test</artifactId>
		<version>${spring.version}</version>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>p6spy</groupId>
		<artifactId>p6spy</artifactId>
		<version>2.1.3</version>
		<scope>test</scope>
	</dependency>
	<dependency>
		<groupId>org.mockito</groupId>
		<artifactId>mockito-all</artifactId>
		<version>1.10.19</version>
		<scope>test</scope>
	</dependency>
	  <dependency>
		  <groupId>org.powermock</groupId>
		  <artifactId>powermock-module-junit4</artifactId>
		  <version>${powermock.version}</version>
		  <scope>test</scope>
	  </dependency>
	  <dependency>
		  <groupId>org.powermock</groupId>
		  <artifactId>powermock-api-mockito</artifactId>
		  <version>${powermock.version}</version>
		  <scope>test</scope>
	  </dependency>


	  <!-- testng: 与junit同时存在还是有些问题(webapp): 暂时只使用junit -->
	<!-- 
	<dependency>
		<groupId>org.testng</groupId>
		<artifactId>testng</artifactId>
		<version>6.8.21</version>
		<scope>test</scope>
	</dependency>
	 -->

    <dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>${log4j.version}</version>
	</dependency>
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-api</artifactId>
		<version>1.6.4</version>
	</dependency>
	<!-- 
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-nop</artifactId>
		<version>1.6.4</version>
	</dependency> -->
	<dependency>
		<groupId>org.slf4j</groupId>
		<artifactId>slf4j-log4j12</artifactId>
		<version>1.7.10</version>
	</dependency>
	
	
	<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.2.4</version>
	</dependency>

	<dependency>
		<groupId>org.codehaus.jackson</groupId>
		<artifactId>jackson-core-asl</artifactId>
		<version>${jackson.version}</version>
	</dependency>
	<dependency>
		<groupId>org.codehaus.jackson</groupId>
		<artifactId>jackson-mapper-asl</artifactId>
		<version>${jackson.version}</version>
	</dependency>
  </dependencies>
  <modules>
  	<module>test-app</module>
  	<module>test-webapp</module>
  </modules>
  
  <build>
  <pluginManagement>
		<plugins>
		<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-surefire-plugin</artifactId>
		<version>${surefire.version}</version>
		<!-- 
		<dependencies>
			<dependency>
				<groupId>org.apache.maven.surefire</groupId>
				<artifactId>surefire-junit47</artifactId>
				<version>${surefire.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.surefire</groupId>
				<artifactId>surefire-testng</artifactId>
				<version>${surefire.version}</version>
			</dependency>
		</dependencies>
		 -->
	</plugin>
			<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>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.12</version>
				<executions>
					<execution>
						<id>default</id>
						<goals>
							<goal>integration-test</goal>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${plugin.jacoco.version}</version>
				<configuration>
					<destFile>${sonar.jacoco.reportPath}</destFile>
				</configuration>
				<executions>
					<execution>
						<id>agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.3</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.4</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!--
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin> -->
		</plugins>
		</pluginManagement>
	</build>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>
</project>
