<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>org.bitbucket.gt_tech</groupId>
	<artifactId>nano-rxnetty-mvc-server</artifactId>
	<version>1.0.0</version>
	<packaging>jar</packaging>

	<name>Nano RxNetty MVC Server</name>

	<inceptionYear>2017</inceptionYear>

	<issueManagement>
		<system>Bitbucket Repo Issue Tracker</system>
		<url>https://bitbucket.org/gt_tech/nano-rxnetty-mvc-server/issues</url>
	</issueManagement>

	<licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
			<distribution>Maven Central repository</distribution>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git//bitbucket.org/gt_tech/nano-rxnetty-mvc-server.git</connection>
		<developerConnection>scm:git:ssh://bitbucket.org:gt_tech/nano-rxnetty-mvc-server.git</developerConnection>
		<url>https://bitbucket.org/gt_tech/nano-rxnetty-mvc-server/</url>
	</scm>

	<developers>
		<developer>
			<id>gt_tech</id>
			<name>GT</name>
			<roles>
				<role>Product owner</role>
				<role>Design</role>
				<role>Developer</role>
			</roles>
		</developer>
	</developers>

	<description>
	This component came out of one of hobby projects. It provides a small annotation based MVC framework on top of RxNetty 
	in an attempt to make it easy to develop REST API or traditional Server side HTTP applications on top of RxNetty.
	</description>
	<url>https://bitbucket.org/gt_tech/nano-rxnetty-mvc-server</url>

	<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>

	<properties>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<java.source.version>1.8</java.source.version>
		<java.target.version>1.8</java.target.version>

		<spring.boot.version>1.5.2.RELEASE</spring.boot.version>
		<rxnetty.version>0.5.2</rxnetty.version>
		<netty.version>4.1.5.Final</netty.version>
		<rxjava.version>1.2.6</rxjava.version>
		<commons-lang.version>2.6</commons-lang.version>
		<mockito.version>1.10.19</mockito.version>


		<plugin.compiler.version>3.6.1</plugin.compiler.version>
		<plugin.source.version>3.0.1</plugin.source.version>
		<plugin.javadoc.version>2.10.4</plugin.javadoc.version>
		<plugin.checkstyle.version>2.17</plugin.checkstyle.version>
		<plugin.surefire.version>2.19.1</plugin.surefire.version>
		<plugin.failsafe.version>2.19.1</plugin.failsafe.version>
		<plugin.jacoco.version>0.7.9</plugin.jacoco.version>
		<jacoco.it.execution.data.file>${project.build.directory}/coverage-reports/jacoco-it.exec</jacoco.it.execution.data.file>
		<jacoco.ut.execution.data.file>${project.build.directory}/coverage-reports/jacoco-ut.exec</jacoco.ut.execution.data.file>
		<plugin.surefire.report.version>2.19.1</plugin.surefire.report.version>
		<skip.integration.tests>false</skip.integration.tests>
		<skip.unit.tests>false</skip.unit.tests>
		<skip.jacoco.code.coverage>false</skip.jacoco.code.coverage>
		<plugin.project.info.reports.version>2.9</plugin.project.info.reports.version>
		<plugin.antrun.version>1.8</plugin.antrun.version>
		<plugin.site.version>3.6</plugin.site.version>
		<plugin.doxia.module.markdown.version>1.7</plugin.doxia.module.markdown.version>
		<plugin.gps.version>1.6</plugin.gps.version>
	</properties>

	<dependencyManagement>

		<dependencies>
			<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>

	<dependencies>


		<dependency>
			<groupId>io.reactivex</groupId>
			<artifactId>rxjava</artifactId>
			<version>${rxjava.version}</version>
		</dependency>

		<dependency>
			<groupId>io.reactivex</groupId>
			<artifactId>rxnetty-http</artifactId>
			<version>${rxnetty.version}</version>
		</dependency>

		<dependency>
			<groupId>io.reactivex</groupId>
			<artifactId>rxnetty-common</artifactId>
			<version>${rxnetty.version}</version>
		</dependency>
		<dependency>
			<groupId>io.reactivex</groupId>
			<artifactId>rxnetty-tcp</artifactId>
			<version>${rxnetty.version}</version>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-codec-http</artifactId>
			<version>${netty.version}</version>
		</dependency>
		<dependency>
			<groupId>io.netty</groupId>
			<artifactId>netty-handler</artifactId>
			<version>${netty.version}</version>
		</dependency>


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

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

		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter</artifactId>
		</dependency>

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

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>


	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${plugin.compiler.version}</version>
				<configuration>
					<source>${java.source.version}</source>
					<target>${java.target.version}</target>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${plugin.source.version}</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>${plugin.javadoc.version}</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>${plugin.checkstyle.version}</version>
				<configuration>
					<configLocation>file:///${project.basedir}/build-tools/code_quality/checkstyle.xml</configLocation>
					<headerLocation>file:///${project.basedir}/LICENSE.txt</headerLocation>
				</configuration>
				<executions>
					<execution>
						<id>checkstyle</id>
						<phase>validate</phase>
						<goals>
							<!-- <goal>check</goal> -->
							<goal>checkstyle</goal>
						</goals>
						<configuration>
							<failOnViolation>true</failOnViolation>
						</configuration>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${plugin.surefire.version}</version>
				<configuration>
					<!-- Sets the VM argument line used when unit tests are run. -->
					<argLine>${surefireArgLine}</argLine>
					<skipTests>${skip.unit.tests}</skipTests>
					<includes>
						<include>**/*Test.java</include>
					</includes>
					<excludes>
						<exclude>**/*IT.java</exclude>
					</excludes>

				</configuration>
				<executions>
					<execution>
						<id>unit-test</id>
						<phase>test</phase>
						<goals>
							<goal>test</goal>
						</goals>
						<configuration>
							<includes>
								<include>**/*Test.java</include>
							</includes>
							<excludes>
								<exclude>**/*IT.java</exclude>
							</excludes>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.apache.maven.plugins
										</groupId>
										<artifactId>
											maven-checkstyle-plugin
										</artifactId>
										<versionRange>
											[2.17,)
										</versionRange>
										<goals>
											<goal>check</goal>
											<goal>checkstyle</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<!-- To activate below profile, provide a command with -P integration-tests -->
	<profiles>
		<profile>
			<id>integration-tests</id>
			<build>
				<plugins>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-failsafe-plugin</artifactId>
						<version>${plugin.failsafe.version}</version>
						<configuration>
							<!-- Sets the VM argument line used when integration tests are run. -->
							<argLine>${failsafeArgLine}</argLine>
							<skipTests>${skip.integration.tests}</skipTests>
							<includes>
								<include>**/*IT.java</include>
							</includes>
							<excludes>
								<exclude>**/*Test.java</exclude>
							</excludes>
						</configuration>
						<executions>
							<execution>
								<id>run-integration-tests</id>
								<phase>integration-test</phase>
								<goals>
									<goal>integration-test</goal>
									<goal>verify</goal>
								</goals>
								<configuration>
									<includes>
										<include>**/*IT.java</include>
									</includes>
									<excludes>
										<exclude>**/*Test.java</exclude>
									</excludes>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<!-- To activate below profile, provide a command with -P reporting -->
		<profile>
			<id>reporting</id>
			<reporting>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-report-plugin</artifactId>
						<version>${plugin.surefire.report.version}</version>
						<reportSets>
							<reportSet>
								<reports>
									<report>report-only</report>
									<report>failsafe-report-only</report>
								</reports>
							</reportSet>
						</reportSets>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>${plugin.javadoc.version}</version>
						<reportSets>
							<reportSet>
								<reports>
									<report>javadoc</report>
								</reports>
							</reportSet>
						</reportSets>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-checkstyle-plugin</artifactId>
						<version>${plugin.checkstyle.version}</version>
						<configuration>
							<configLocation>file:///${project.basedir}/build-tools/code_quality/checkstyle.xml</configLocation>
							<headerLocation>file:///${project.basedir}/LICENSE.txt</headerLocation>
						</configuration>
						<reportSets>
							<reportSet>
								<reports>
									<report>checkstyle</report>
								</reports>
							</reportSet>
						</reportSets>
					</plugin>

					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-project-info-reports-plugin</artifactId>
						<version>${plugin.project.info.reports.version}</version>
						<configuration>
							<dependencyLocationsEnabled>false</dependencyLocationsEnabled>
						</configuration>
					</plugin>

				</plugins>
			</reporting>
			<build>
				<plugins>
					<!-- For generating code-coverage reports -->
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>${plugin.jacoco.version}</version>
						<configuration>
							<skip>${skip.jacoco.code.coverage}</skip>
						</configuration>
						<executions>
							<!-- Prepares the property pointing to the JaCoCo runtime agent which 
								is passed as VM argument when Maven the Surefire plugin is executed. -->
							<execution>
								<id>pre-unit-test</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
								<configuration>
									<!-- Sets the path to the file which contains the execution data. -->
									<destFile>${jacoco.ut.execution.data.file}</destFile>
									<!-- Sets the name of the property containing the settings for JaCoCo 
										runtime agent. -->
									<propertyName>surefireArgLine</propertyName>
								</configuration>
							</execution>
							<!-- Ensures that the code coverage report for unit tests is created 
								after unit tests have been run. -->
							<execution>
								<id>post-unit-test</id>
								<phase>test</phase>
								<goals>
									<goal>report</goal>
								</goals>
								<configuration>
									<!-- Sets the path to the file which contains the execution data. -->
									<dataFile>${jacoco.ut.execution.data.file}</dataFile>
									<!-- Sets the output directory for the code coverage report. -->
									<outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
									<title>Nano RxNetty MVC Server - Unit Test code coverage</title>
								</configuration>
							</execution>
							<!-- Prepares the property pointing to the JaCoCo runtime agent which 
								is passed as VM argument when Maven the Failsafe plugin is executed. -->
							<execution>
								<id>pre-integration-test</id>
								<phase>pre-integration-test</phase>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
								<configuration>
									<!-- Sets the path to the file which contains the execution data. -->
									<destFile>${jacoco.it.execution.data.file}</destFile>
									<!-- Sets the name of the property containing the settings for JaCoCo 
										runtime agent. -->
									<propertyName>failsafeArgLine</propertyName>
								</configuration>
							</execution>
							<!-- Ensures that the code coverage report for integration tests after 
								integration tests have been run. -->
							<execution>
								<id>post-integration-test</id>
								<phase>post-integration-test</phase>
								<goals>
									<goal>report</goal>
								</goals>
								<configuration>
									<!-- Sets the path to the file which contains the execution data. -->
									<dataFile>${jacoco.it.execution.data.file}</dataFile>
									<!-- Sets the output directory for the code coverage report. -->
									<outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
									<title>Nano RxNetty MVC Server - Integration Test code coverage</title>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- START: Building project site, note that by default site-plugin-would 
						look for external files in src/site folder but to change that we define the 
						folder elsewhere, and use an ant task to copy those files in compile phase -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>${plugin.antrun.version}</version>
						<executions>
							<execution>
								<id>copy</id>
								<phase>compile</phase>
								<configuration>
									<tasks>
										<copy todir="${project.build.directory}/custom_staging_for_site"
											overwrite="true">
											<fileset dir="${project.basedir}/build-tools/site"
												includes="**" />
										</copy>
										<copy file="${project.basedir}/README.md"
											tofile="${project.build.directory}/custom_staging_for_site/markdown/README.md"
											overwrite="true" />
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-site-plugin</artifactId>
						<version>${plugin.site.version}</version>
						<dependencies>
							<dependency>
								<groupId>org.apache.maven.doxia</groupId>
								<artifactId>doxia-module-markdown</artifactId>
								<version>${plugin.doxia.module.markdown.version}</version>
							</dependency>
						</dependencies>
						<configuration>
							<relativizeDecorationLinks>false</relativizeDecorationLinks>
							<!-- Refer the antrun plugin above to ensure that below is in sync 
								with ant configs -->
							<siteDirectory>${project.build.directory}/custom_staging_for_site</siteDirectory>
						</configuration>
					</plugin>
					<!-- STOP: Project site -->
				</plugins>
			</build>
		</profile>

		<!-- Profile usually to take care of release (to OSSRH and eventually to 
			Maven Central) -->
		<profile>
			<id>sign-artifacts</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${plugin.gps.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>