<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright © 2009 HotPads (admin@hotpads.com)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>io.datarouter</groupId>
	<artifactId>datarouter-parent</artifactId>
	<version>0.0.9</version>
	<packaging>pom</packaging>

	<name>datarouter-parent</name>
	<description>datarouter-parent</description>
	<url>https://github.com/hotpads/datarouter</url>
	<inceptionYear>2009</inceptionYear>
	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Calixte Bonsart</name>
			<email>cbonsart@hotpads.com</email>
			<organization>HotPads</organization>
			<organizationUrl>https://hotpads.com</organizationUrl>
		</developer>
		<developer>
			<name>Clément Guillaume</name>
			<email>cguillaume@hotpads.com</email>
			<organization>HotPads</organization>
			<organizationUrl>https://hotpads.com</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:hotpads/datarouter.git</connection>
		<developerConnection>scm:git:git@github.com:hotpads/datarouter.git</developerConnection>
		<url>https://github.com/hotpads/datarouter/tree/master</url>
	</scm>
	<distributionManagement>
		<snapshotRepository>
			<id>hotpads-snapshots</id>
			<url>${snapshots.url}</url>
		</snapshotRepository>
	</distributionManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<aws-sdk-version>1.11.456</aws-sdk-version>
		<gson-version>2.8.5</gson-version>
		<slf4j-version>1.7.25</slf4j-version>
		<log4j-version>2.11.1</log4j-version>
		<httpclient-version>4.5.6</httpclient-version>
		<guice-version>4.2.2</guice-version>
		<guava-version>27.0.1-jre</guava-version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>6.14.3</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>ru.yaal.maven</groupId>
				<artifactId>write-text-files-maven-plugin</artifactId>
				<version>1.1</version>
				<executions>
					<execution>
						<phase>prepare-package</phase>
						<goals>
							<goal>write-text-files</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<files>
						<file>
							<path>target/classes/build.properties</path>
							<lines>
								<line>buildId=${env.BUILD_NUMBER}</line>
							</lines>
						</file>
					</files>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>2.2.4</version>
				<executions>
					<execution>
						<goals>
							<goal>revision</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<generateGitPropertiesFile>true</generateGitPropertiesFile>
					<useNativeGit>true</useNativeGit>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.0</version>
					<configuration>
						<compilerId>eclipse</compilerId>
						<source>1.8</source>
						<target>1.8</target>
						<optimize>true</optimize>
						<fork>true</fork>
						<parameters>true</parameters>
						<compilerArgs>
<!-- https://github.com/eclipse/eclipse.jdt.core/blob/f6792492f110837cda3b566a10e36beea4e54b03/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java#L4417 -->
							<arg>-err:+suppress</arg>
							<arg>-err:+unlikelyCollectionMethodArgumentType</arg>
							<arg>-err:+unlikelyEqualsArgumentType</arg>
						</compilerArgs>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>org.codehaus.plexus</groupId>
							<artifactId>plexus-compiler-eclipse</artifactId>
							<version>2.8.5</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.jdt</groupId>
							<artifactId>ecj</artifactId>
							<version>3.14.0</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0-M1</version>
					<executions>
						<execution>
							<id>default-test</id>
							<phase>none</phase>
						</execution>
						<execution>
							<goals>
								<goal>test</goal>
							</goals>
							<id>src/main unit test</id>
							<configuration>
								<testClassesDirectory>${project.basedir}/target/classes/</testClassesDirectory>
							</configuration>
						</execution>
						<execution>
							<goals>
								<goal>test</goal>
							</goals>
							<id>src/test unit test</id>
							<configuration>
								<testClassesDirectory>${project.basedir}/target/test-classes/</testClassesDirectory>
							</configuration>
						</execution>
					</executions>
					<configuration>
						<includes>
							<include>**/*Tests.class</include>
						</includes>
						<excludes>
							<exclude>**/*IntegrationTests.class</exclude>
						</excludes>
						<reportFormat>plain</reportFormat>
						<trimStackTrace>false</trimStackTrace>
						<argLine>-Djava.awt.headless=true</argLine>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-failsafe-plugin</artifactId>
					<version>3.0.0-M1</version>
					<executions>
						<execution>
							<goals>
								<goal>integration-test</goal>
								<goal>verify</goal>
							</goals>
							<id>src/main integration test</id>
							<configuration>
								<testClassesDirectory>${project.basedir}/target/classes/</testClassesDirectory>
							</configuration>
						</execution>
						<execution>
							<goals>
								<goal>integration-test</goal>
								<goal>verify</goal>
							</goals>
							<id>src/test integration test</id>
							<configuration>
								<testClassesDirectory>${project.basedir}/target/test-classes/</testClassesDirectory>
							</configuration>
						</execution>
					</executions>
					<configuration>
						<testClassesDirectory>${project.basedir}/target/classes/</testClassesDirectory>
						<forkCount>1C</forkCount><!-- fork is a JVM.  the C multiplies by number of cores -->
						<reuseForks>true</reuseForks>
						<threadCount>2</threadCount>
						<parallel>classesAndMethods</parallel>
						<includes>
							<include>**/*IntegrationTests.class</include>
						</includes>
						<excludes>
							<!-- override the default surefire excludes to be able to run inner test classes -->
							<exclude></exclude>
						</excludes>
						<reportFormat>plain</reportFormat>
						<trimStackTrace>false</trimStackTrace>
						<argLine>-Djava.awt.headless=true</argLine>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>3.0</version>
					<configuration>
						<header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
						<properties>
							<owner>HotPads</owner>
							<email>admin@hotpads.com</email>
						</properties>
						<excludes>
							<exclude>src/main/resources/**</exclude>
						</excludes>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>check</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.0.1</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>3.0.0</version>
					<executions>
						<execution>
							<id>attach-javadoc</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
