<?xml version="1.0" encoding="UTF-8"?>
<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>
	<packaging>pom</packaging>
	
	<artifactId>tio-starter</artifactId>
	<name>${project.artifactId}</name>
	<groupId>org.rockyang</groupId>
	<version>1.2.2</version>
	<description>t-io 框架的 spring-boot-starter</description>
	<url>https://gitee.com/blackfox/tio-starter</url>
	
	<scm>
		<connection>scm:https://gitee.com/blackfox/tio-starter.git</connection>
		<developerConnection>scm:https://gitee.com/blackfox/tio-starter.git</developerConnection>
		<url>https://gitee.com/blackfox/tio-starter.git</url>
	</scm>
	
	<modules>
		<module>tio-spring-boot-common</module>
		<module>tio-core-spring-boot-starter</module>
		<module>tio-websocket-spring-boot-starter</module>
		<module>samples</module>
	</modules>
	
	<properties>
		<spring-boot.version>2.1.5.RELEASE</spring-boot.version>
		<tio.version>3.3.4.v20190705-RELEASE</tio.version>
		
		<!-- versions -->
		<java.version>1.8</java.version>
		<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
		<maven-shade-plugin.version>3.2.0</maven-shade-plugin.version>
		<maven-source-plugin.version>3.1.0</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
		<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<nexus-staging.version>1.6.8</nexus-staging.version>
		
		<!-- vars -->
		<skip_junit_test>true</skip_junit_test>
		<skip_maven_deploy>false</skip_maven_deploy>
	</properties>
	
	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	
	<developers>
		<developer>
			<name>RockYang</name>
			<email>yangjian102621@gmail.com</email>
		</developer>
	</developers>
	
	<profiles>
		<!-- local nexus repository for test -->
		<profile>
			<id>dev</id>
			<properties>
				<profiles.active>dev</profiles.active>
			</properties>
			<!-- configures for artifact deployment -->
			<distributionManagement>
				<repository>
					<id>releases</id>
					<name>Release Repository</name>
					<url>http://localhost:8081/repository/maven-releases</url>
				</repository>
				<snapshotRepository>
					<id>snapshots</id>
					<name>Snapshot Repository</name>
					<url>http://localhost:8081/repository/maven-snapshots/</url>
				</snapshotRepository>
			</distributionManagement>
			<activation>
				<!-- default active -->
				<activeByDefault>true</activeByDefault>
			</activation>
		</profile>
		
		<!-- Central maven repository -->
		<profile>
			<id>oss</id>
			<properties>
				<profiles.active>release</profiles.active>
			</properties>
			<distributionManagement>
				<snapshotRepository>
					<id>oss</id>
					<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
				</snapshotRepository>
				<repository>
					<id>oss</id>
					<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
				</repository>
			</distributionManagement>
			<build>
				<plugins>
					<!-- Gpg Signature -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>oss</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					
					<!-- Nexus Staging Plugin, auto deploy close and release -->
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>${nexus-staging.version}</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>oss</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.t-io</groupId>
				<artifactId>tio-core</artifactId>
				<version>${tio.version}</version>
			</dependency>
			
			<dependency>
				<groupId>org.t-io</groupId>
				<artifactId>tio-websocket-server</artifactId>
				<version>${tio.version}</version>
			</dependency>
			
			<dependency>
				<groupId>org.t-io</groupId>
				<artifactId>tio-utils</artifactId>
				<version>${tio.version}</version>
			</dependency>
			
			<dependency>
				<groupId>org.redisson</groupId>
				<artifactId>redisson</artifactId>
				<version>3.11.0</version>
			</dependency>
			
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>${spring-boot.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	
	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
				<includes>
					<include>**/*.factories</include>
					<include>**/*.provides</include>
				</includes>
			</resource>
		</resources>
		
		<plugins>
			<!-- setting compiler version and file encoding -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<encoding>${maven.compiler.encoding}</encoding>
					<!-- skip the unit test -->
					<skip>${skip_junit_test}</skip>
				</configuration>
			</plugin>
			
			<!-- packaging source code -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- Javadoc -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<!-- skip javadoc error -->
				<configuration>
					<failOnError>false</failOnError>
					<doclint>none</doclint>
				</configuration>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- set package tagName format -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${maven-release-plugin.version}</version>
				<configuration>
					<goals>deploy</goals>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<tagNameFormat>${project.version}</tagNameFormat>
				</configuration>
			</plugin>
			<!-- skip to deploy to repository -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>${maven-deploy-plugin.version}</version>
				<configuration>
					<skip>${skip_maven_deploy}</skip>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
