<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.kount</groupId>
  <artifactId>kount-java-parent</artifactId>
  <version>8.0.0</version>
  <packaging>pom</packaging>

  <name>Kount Java SDK</name>
	
  <description>A wrapper to facilitate making Kount RIS calls</description>
	
  <url>https://github.com/Kount/kount-ris-java-sdk</url>
	<distributionManagement>
		<repository>
			<id>central</id>
			<url>https://central.sonatype.com/server</url>
		</repository>
	</distributionManagement>


  <developers>
    <developer>
      <name>Kount Team</name>
      <email>sdkadmin@kount.com</email>
      <organization>Kount Inc.</organization>
    </developer>
  </developers>

  <modules>
    <module>kount-ris-sdk</module>
    <module>sdk-integration-tests</module>
  </modules>

  <properties>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.release.plugin.version>3.1.1</maven.release.plugin.version>

    <log4j-core.version>2.24.3</log4j-core.version>
    <log4j-api.version>2.24.3</log4j-api.version>
	<jackson.version>2.18.2</jackson.version>
	<httpclient5.version>5.4.2</httpclient5.version>
	<httpcomponents.version>5.3.3</httpcomponents.version>
    <junit.version>5.11.4</junit.version>
	<jacoco-maven-plugin.version>0.8.12</jacoco-maven-plugin.version>
	<hamcrest.version>3.0</hamcrest.version>
  </properties>
  
  <licenses>
		<license>
			<name>Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	
	<profiles>
		<profile>
			<id>kount-ris-sdk</id>
		</profile>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
		</profile>


		<!-- Activate using the release property: mvn clean install -Prelease -->
		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>release</name>
				</property>
			</activation>

			<build>
				<plugins>
					<!-- To generate javadoc -->
					<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-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.11.2</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!-- To sign the artifacts -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.2.7</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>

								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>

			</build>
		</profile>

	</profiles>
	

  <dependencyManagement>
    <dependencies>
	
      <dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>${log4j-core.version}</version>
		</dependency>
	
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
			<version>${log4j-api.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.httpcomponents.client5</groupId>
			<artifactId>httpclient5</artifactId>
			<version>${httpclient5.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents.core5</groupId>
			<artifactId>httpcore5</artifactId>
			<version>${httpcomponents.version}</version>
		</dependency>

		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
		</dependency>

		<dependency>
		  <groupId>org.junit.jupiter</groupId>
		  <artifactId>junit-jupiter-api</artifactId>
		  <version>${junit.version}</version>
		  <scope>test</scope>
        </dependency>

		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest</artifactId>
			<version>${hamcrest.version}</version>
			<scope>test</scope>
		</dependency>

	</dependencies>
  </dependencyManagement>

  <reporting>
        <outputDirectory>target/reports</outputDirectory>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
            </plugin>
        </plugins>
    </reporting>

  	<build>
    	<plugins>
			<plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>pre-unit-test</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                        <configuration>
                            <propertyName>surefire.jacoco.args</propertyName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>post-unit-test</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>pre-integration-test</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>prepare-agent-integration</goal>
                        </goals>
                        <configuration>
                            <dumpOnExit>true</dumpOnExit>
                            <propertyName>failsafe.jacoco.args</propertyName>
                        </configuration>
                    </execution>
                    <execution>
                        <id>post-integration-test</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report-aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.20</version>
				<configuration>
				<argLine>${surefire.jacoco.args}</argLine>
				<systemPropertyVariables>
					<kount.config.key>${config.key}</kount.config.key>
				</systemPropertyVariables>
				<printSummary>true</printSummary>
					<redirectTestOutputToFile>true</redirectTestOutputToFile>
					<useFile>false</useFile>
					<reportFormat>xml</reportFormat>
					<runOrder>random</runOrder>
				</configuration>
				<executions>
					<execution>
						<id>default-test</id>
						<configuration>
							<skipTests>true</skipTests>
						</configuration>
					</execution>
					<execution>
						<id>unit-tests</id>
						<phase>test</phase>
						<goals>
							<goal>test</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>2.22.2</version>
				<configuration>
					<argLine>${failsafe.jacoco.args}</argLine>
					<printSummary>true</printSummary>
					<redirectTestOutputToFile>true</redirectTestOutputToFile>
					<useFile>false</useFile>
					<reuseForks>false</reuseForks>
					<forkCount>5</forkCount>
					<reportFormat>xml</reportFormat>
				</configuration>
				<executions>
					<execution>
					<goals>
						<goal>integration-test</goal>
						<goal>verify</goal>
					</goals>
					<configuration>
						<includes>
							<include>**/*Test.java</include>
							<include>**/Test*.java</include>
						</includes>
					</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.sonatype.central</groupId>
				<artifactId>central-publishing-maven-plugin</artifactId>
				<version>0.7.0</version>
				<extensions>true</extensions>
				<configuration>
					<publishingServerId>central</publishingServerId>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>3.2.7</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>package</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
  	</build>

  <scm>
    <connection>scm:git:git@github.com:Kount/kount-ris-java-sdk.git</connection>
    <developerConnection>scm:git:git@github.com:Kount/kount-ris-java-sdk.git</developerConnection>
    <url>scm:git:git@github.com:Kount/kount-ris-java-sdk.git</url>
    <tag>HEAD</tag>
  </scm>

</project>
