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

	<scm>
		<connection>scm:git:git://github.com/mosip/mosip-ref-impl.git</connection>
		<developerConnection>scm:git:ssh://github.com:mosip/mosip-ref-impl.git</developerConnection>
		<url>https://github.com/mosip/mosip-ref-impl</url>
		<tag>HEAD</tag>
	</scm>

	<artifactId>biosdk-client</artifactId>
	<groupId>io.mosip.biosdk</groupId>
	<version>1.2.0.2</version>
	<name>biosdk-client</name>

	<description>Sample implementation of biometrics SDK client</description>
	<url>https://github.com/mosip/mosip-ref-impl</url>

	<licenses>
		<license>
			<name>MPL 2.0</name>
			<url>https://www.mozilla.org/en-US/MPL/2.0/</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Mosip</name>
			<email>mosip.emailnotifier@gmail.com</email>
			<organization>io.mosip</organization>
			<organizationUrl>https://github.com/mosip/mosip-ref-impl</organizationUrl>
		</developer>
	</developers>

	<repositories>
		<repository>
			<id>ossrh</id>
			<name>MavenCentralRepository</name>
			<url>https://central.sonatype.com/repository/maven-snapshots</url>
			<layout>default</layout>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
		<repository>
			<id>central</id>
			<name>MavenCentral</name>
			<layout>default</layout>
			<url>https://repo1.maven.org/maven2</url>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
		</repository>
	</repositories>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://central.sonatype.com/repository/maven-snapshots/</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://central.sonatype.com/api/v1/publisher</url>
		</repository>
	</distributionManagement>

	<properties>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.jar.plugin.version>3.0.2</maven.jar.plugin.version>
		<maven.compiler.version>3.8.0</maven.compiler.version>
		<maven.deploy.version>2.8.1</maven.deploy.version>
		<maven.javadoc.version>3.2.0</maven.javadoc.version>
		<maven.assembly.version>3.3.0</maven.assembly.version>
		<maven.surefire.plugin.version>2.22.0</maven.surefire.plugin.version>
		<maven.jacoco.plugin.version>0.8.5</maven.jacoco.plugin.version>
		<maven.sonar.plugin.version>3.7.0.1746</maven.sonar.plugin.version>
		<central.publishing.maven.plugin.version>0.7.0</central.publishing.maven.plugin.version>
		<jackson.version>2.12.1</jackson.version>
		<!-- Lombok -->
		<lombok.version>1.18.8</lombok.version>

		<!-- Core -->
		<springframework.version>5.0.6.RELEASE</springframework.version>

		<!-- Kernel -->
		<kernel.logger.logback.version>1.2.0.1</kernel.logger.logback.version>
		<kernel.core.version>1.2.0.1</kernel.core.version>
		<kernel.biometrics.api.version>1.2.0.4</kernel.biometrics.api.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-biometrics-api</artifactId>
			<version>${kernel.biometrics.api.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>
            			spring-boot-starter-security
            		</artifactId>
				</exclusion>
				<exclusion>
					<groupId>io.mosip.kernel</groupId>
					<artifactId>kernel-core</artifactId>
				</exclusion>
            	<exclusion>
            		<groupId>com.fasterxml.jackson.core</groupId>
            		<artifactId>jackson-databind</artifactId>
            	</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-logger-logback</artifactId>
			<version>${kernel.logger.logback.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-starter-security</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-starter-test</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-starter</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.springframework.data</groupId>
					<artifactId>spring-data-jpa</artifactId>
				</exclusion>
				<exclusion>
					<groupId>io.mosip.kernel</groupId>
					<artifactId>kernel-core</artifactId>
				</exclusion>
                <exclusion>
                	<groupId>com.fasterxml.jackson.core</groupId>
                	<artifactId>jackson-databind</artifactId>
                </exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${springframework.version}</version>
		</dependency>

		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>${lombok.version}</version>
			<scope>provided</scope>
		</dependency>


		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.11</version>
		</dependency>

		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>1.15</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
			<version>1.7.25</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<version>1.7.25</version>
		</dependency>

		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>4.5.6</version>
		</dependency>

		<!-- testing temphttps://mvnrepository.com/artifact/com.googlecode.json-simple/json-simple -->
		<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
			<version>1.1.1</version>
		</dependency>

		<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.8.6</version>
		</dependency>

		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-core</artifactId>
			<version>${kernel.core.version}</version>
        	<exclusions>
        		<exclusion>
        			<groupId>com.fasterxml.jackson.core</groupId>
        			<artifactId>jackson-databind</artifactId>
        		</exclusion>
        		<exclusion>
        			<groupId>com.fasterxml.jackson.core</groupId>
        			<artifactId>jackson-annotations</artifactId>
        		</exclusion>
        	</exclusions>
        </dependency>
        <dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.module</groupId>
			<artifactId>jackson-module-jaxb-annotations</artifactId>
			<version>${jackson.version}</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven.surefire.plugin.version}</version>
				<configuration>
					<skipTests>${skipTests}</skipTests>
					<skip>false</skip>
					<argLine>
                        ${argLine} --add-opens java.xml/jdk.xml.internal=ALL-UNNAMED --illegal-access=permit
                    </argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.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-gpg-plugin</artifactId>
				<version>1.5</version>
				<!--<configuration><skip>true</skip></configuration>-->
				<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>
			<plugin>
				<groupId>org.sonatype.central</groupId>
				<artifactId>central-publishing-maven-plugin</artifactId>
				<version>${central.publishing.maven.plugin.version}</version>
				<extensions>true</extensions>
				<configuration>
					<publishingServerId>ossrh</publishingServerId>
					<autoPublish>false</autoPublish>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${maven.jacoco.plugin.version}</version>
				<executions>
					<execution>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven.compiler.version}</version>
				<configuration>
					<source>11</source>
					<target>11</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>${maven.deploy.version}</version>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven.javadoc.version}</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<doclint>none</doclint>
				</configuration>
			</plugin>

			<!--            <plugin>-->
			<!--                <groupId>org.apache.maven.plugins</groupId>-->
			<!--                <artifactId>maven-gpg-plugin</artifactId>-->
			<!--                <version>1.5</version>-->
			<!--                <executions>-->
			<!--                    <execution>-->
			<!--                        <id>sign-artifacts</id>-->
			<!--                        <phase>verify</phase>-->
			<!--                        <goals>-->
			<!--                            <goal>sign</goal>-->
			<!--                        </goals>-->
			<!--                        <configuration>-->
			<!--                            <gpgArguments>-->
			<!--                                <arg>&#45;&#45;pinentry-mode</arg>-->
			<!--                                <arg>loopback</arg>-->
			<!--                            </gpgArguments>-->
			<!--                        </configuration>-->
			<!--                    </execution>-->
			<!--                </executions>-->
			<!--            </plugin>-->

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>${maven.assembly.version}</version>
				<configuration>
					<archive>
						<manifest>
							<mainClass>io.mosip.biosdk.client.impl.spec_1_0.Client_V_1_0</mainClass>
						</manifest>
					</archive>
					<descriptorRefs>
						<descriptorRef>jar-with-dependencies</descriptorRef>
					</descriptorRefs>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id> <!-- this is used for inheritance merges -->
						<phase>package</phase> <!-- bind to the packaging phase -->
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>3.0.1</version>
				<executions>
					<execution>
						<id>get-the-git-infos</id>
						<goals>
							<goal>revision</goal>
						</goals>
						<phase>validate</phase>
					</execution>
				</executions>
				<configuration>
					<generateGitPropertiesFile>true</generateGitPropertiesFile>
					<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
					<includeOnlyProperties>
						<includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
						<includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
					</includeOnlyProperties>
					<commitIdGenerationMode>full</commitIdGenerationMode>
					<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
					<!-- <format>json</format> -->
				</configuration>
			</plugin>
		</plugins>
	</build>
	<profiles>
		<profile>
			<id>sonar</id>
			<properties>
				<sonar.sources>.</sonar.sources>
				<sonar.inclusions>src/main/java/**,src/main/resources/**</sonar.inclusions>
				<sonar.exclusions>${sonar.coverage.exclusions}</sonar.exclusions>
				<sonar.host.url>https://sonarcloud.io</sonar.host.url>
			</properties>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonarsource.scanner.maven</groupId>
						<artifactId>sonar-maven-plugin</artifactId>
						<version>${maven.sonar.plugin.version}</version>
						<executions>
							<execution>
								<phase>verify</phase>
								<goals>
									<goal>sonar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
