<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright [2017] [Trifon Trifonov]

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

	<modelVersion>4.0.0</modelVersion>
	<groupId>com.github.chameleontartu</groupId>
	<artifactId>amazon-mws-client-runtime-maven</artifactId>
	<version>1.5.0</version>
	<packaging>jar</packaging>
	<name>Amazon MWS :: Client Runtime</name>
	<description>Amazon MWS Client Runtime Java Library</description>
	<url>https://github.com/ChameleonTartu/amazon-mws-client-runtime-maven</url>

	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>chameleontartu</id>
			<name>Dmytro Chasovskyi</name>
			<url>https://www.linkedin.com/in/dmytrochasovskyi/</url>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>trifonnt</id>
			<name>Trifon Trifonov</name>
			<email>trifon.t@gmail.com</email>
			<timezone>+2</timezone>
			<url>https://www.linkedin.com/in/trifon</url>
			<organization>Trifon Trifonov</organization>
			<organizationUrl>https://www.linkedin.com/in/trifon</organizationUrl>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
		<developer>
			<id>amazon-mws</id>
			<organization>Amazon Technologies, Inc</organization>
			<organizationUrl>https://developer.amazonservices.com/gp/mws/docs.html</organizationUrl>
			<roles>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git@github.com:ChameleonTartu/amazon-mws-client-runtime-maven.git</connection>
		<developerConnection>scm:git:ssh@github.com:ChameleonTartu/amazon-mws-client-runtime-maven.git</developerConnection>
		<url>https://github.com/ChameleonTartu/amazon-mws-client-runtime-maven/tree/master</url>
	</scm>

	<prerequisites>
		<maven>3.8.2</maven>
	</prerequisites>

	<properties>
		<!-- Unify the encoding for all modules -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<jdk.version>1.8</jdk.version>
		<compiler.fork>1.8</compiler.fork>

		<maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>
		<commons-codec-version>1.15</commons-codec-version>
		<commons-logging-version>1.1</commons-logging-version>
		<org-apache-httpcomponents-version>4.5.13</org-apache-httpcomponents-version>

		<mockito-version>1.10.19</mockito-version>
		<junit-version>4.13.2</junit-version>
		<maven-eclipse-plugin.version>2.10</maven-eclipse-plugin.version>
		<dependency-check-maven.version>6.5.2</dependency-check-maven.version>

		<!-- Maven plugins -->
		<maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
		<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
		<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
		<maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
		<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
		<maven-javadoc-plugin.version>3.0.1</maven-javadoc-plugin.version>
		<maven-release-plugin.version>2.5.3</maven-release-plugin.version>
		<maven-scm-provider-gitexe.version>1.12.2</maven-scm-provider-gitexe.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>${commons-codec-version}</version>
		</dependency>
		<dependency>
		    <groupId>commons-logging</groupId>
		    <artifactId>commons-logging-api</artifactId>
		    <version>${commons-logging-version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>${org-apache-httpcomponents-version}</version>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>${mockito-version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit-version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>${maven-assembly-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>${build-helper-maven-plugin.version}</version>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${maven-compiler-plugin.version}</version>
					<configuration>
						<source>${jdk.version}</source>
						<target>${jdk.version}</target>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-eclipse-plugin</artifactId>
					<version>${maven-eclipse-plugin.version}</version>
					<configuration>
						<downloadSources>true</downloadSources>
						<downloadJavadocs>false</downloadJavadocs>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-idea-plugin</artifactId>
					<version>${maven-idea-plugin.version}</version>
					<configuration>
						<downloadSources>true</downloadSources>
						<downloadJavadocs>false</downloadJavadocs>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
					<configuration>
						<attach>true</attach>
						<source>${jdk.version}</source>
						<quiet>true</quiet>
						<detectOfflineLinks>false</detectOfflineLinks>
						<encoding>${project.build.sourceEncoding}</encoding>
						<doclint>none</doclint>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>${maven-install-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>${maven-bundle-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>${nexus-staging-maven-plugin.version}</version>
					<extensions>true</extensions>
					<configuration>
						<serverId>ossrh</serverId>
						<nexusUrl>https://oss.sonatype.org/</nexusUrl>
						<autoReleaseAfterClose>true</autoReleaseAfterClose>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
							<goal>test-jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${maven-release-plugin.version}</version>
				<configuration>
					<localCheckout>true</localCheckout>
					<pushChanges>false</pushChanges>
					<mavenExecutorId>forked-path</mavenExecutorId>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>${maven-scm-provider-gitexe.version}</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>${maven-deploy-plugin.version}</version>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.owasp</groupId>
				<artifactId>dependency-check-maven</artifactId>
				<version>${dependency-check-maven.version}</version>
				<executions>
					<execution>
						<id>owasp</id>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<cveValidForHours>1</cveValidForHours>
					<failBuildOnCVSS>5.0</failBuildOnCVSS>
				</configuration>
			</plugin>

		</plugins>
	</build>

	<profiles>
		<profile>
			<id>signing-deploy</id>
			<activation>
				<property>
					<name>gpg.passphrase</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<!-- This is necessary for gpg to not try to use the pinentry programs -->
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>deploy</id>
			<activation>
				<jdk>[1.8,)</jdk>
			</activation>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-javadoc</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

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