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

	<groupId>io.mosip.authentication</groupId>
	<artifactId>authentication-parent</artifactId>
	<version>1.0.9</version>
	<packaging>pom</packaging>

	<name>id-authentication</name>
	<description>Parent project of MOSIP ID Authentication</description>
	<url>https://github.com/mosip/id-authentication</url>

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

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

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

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

	<repositories>
		<repository>
		  <id>ossrh</id>
		  <name>Central Repository</name>
		  <url>https://oss.sonatype.org/content/repositories/snapshots</url>
		  <layout>default</layout>
		  <snapshots>
			<enabled>true</enabled>
		  </snapshots>
		</repository>
	</repositories> 
	<modules>
		<module>authentication-core</module>
		<module>authentication-common</module>
		<module>authentication-service</module>
		<module>authentication-internal-service</module>
		<module>authentication-kyc-service</module>
		<module>authentication-otp-service</module>
		<module>authentication-keys-generator</module>
	</modules>

	<properties>
		<!--FIXME Temporarily disabling to avoid build error-->
		<sonar.skip>true</sonar.skip>
		
		<authentication.parent.version>${project.version}</authentication.parent.version>
		<authentication-core.version>1.0.9</authentication-core.version>
		<authentication-common.version>1.0.9</authentication-common.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- Kernel components -->
		<kernel.parent.version>1.0.6</kernel.parent.version>
		<kernel-core.version>1.0.9</kernel-core.version>
		<kernel-idgenerator-tokenid.version>1.0.7</kernel-idgenerator-tokenid.version>
		<kernel-idvalidator-uin.version>${kernel.parent.version}</kernel-idvalidator-uin.version>
		<kernel-idvalidator-vid.version>${kernel.parent.version}</kernel-idvalidator-vid.version>
		<kernel-idobjectvalidator.version>1.0.7</kernel-idobjectvalidator.version>
		<kernel-pinvalidator.version>${kernel.parent.version}</kernel-pinvalidator.version>
		<kernel-templatemanager-velocity.version>${kernel.parent.version}</kernel-templatemanager-velocity.version>
		<kernel-keygenerator-bouncycastle.version>${kernel.parent.version}</kernel-keygenerator-bouncycastle.version>
		<kernel-crypto-jce.version>${kernel.parent.version}</kernel-crypto-jce.version>
		<kernel-bioapi-provider.version>1.0.9</kernel-bioapi-provider.version>
		<mock-sdk-version>0.9</mock-sdk-version>
		<kernel-logger-logback.version>${kernel.parent.version}</kernel-logger-logback.version>
		<kernel-dataaccess-hibernate.version>1.0.7</kernel-dataaccess-hibernate.version>
		<kernel-cbeffutil-api.version>1.1.0</kernel-cbeffutil-api.version>
		<kernel-templatemanager-velocity.version>${kernel.parent.version}</kernel-templatemanager-velocity.version>
		<kernel-auth-adapter.version>1.0.9</kernel-auth-adapter.version>
		<kernel-biometrics-api.version>0.9</kernel-biometrics-api.version>
		<kernel-biosdk-provider.version>0.9</kernel-biosdk-provider.version>
		<id-repository-core.version>1.0.9</id-repository-core.version>
		<json.utility.version>20180130</json.utility.version>
				<!-- Maven Plugins -->
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<maven.compiler.version>3.7.0</maven.compiler.version>
		<maven.javadoc.version>3.0.1</maven.javadoc.version>
		<maven.swagger.version>2.9.2</maven.swagger.version>
		<maven.jacoco.version>0.8.2</maven.jacoco.version>
		<maven.sonar.version>3.7.0.1746</maven.sonar.version>
		<powermock.version>2.0.0</powermock.version>

		<!-- Test & Logging -->
		<junit.version>4.12</junit.version>
		<mockito.version>1.10.19</mockito.version>

		<!-- Lombok -->
		<lombok.version>1.16.18</lombok.version>

		<!-- Spring Boot -->
		<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
		<spring-cloud-config.version>2.0.0.RELEASE</spring-cloud-config.version>

		<javax.validation-api.version>2.0.1.Final</javax.validation-api.version>
		<hibernate.validator.version>6.0.12.Final</hibernate.validator.version>
		<jackson.version>2.9.5</jackson.version>
		<postgresql.version>42.2.2</postgresql.version>

		<!-- Commons -->
		<commons.lang.version>2.4</commons.lang.version>
		<commons.codec.version>1.11</commons.codec.version>

		<sourceafis.version>3.4.0</sourceafis.version>

		<sonar.test.exclusions>**/test/**/*.*</sonar.test.exclusions>
		<sonar.exclusions>**/ai/**/*.*,**/jdbc/**/*.*,**/mpt/**/*.*,**/jcr/**/*.*,**/JDBC*,**/constant/**,**/config/**,**/dto/**,**io/mosip/authentication/common/service/filter/**,**io/mosip/authentication/service/filter/**,**io/mosip/authentication/otp/service/filter/**,**io/mosip/authentication/common/policy/**,**io/mosip/authentication/internal/service/filter/**,**io/mosip/authentication/kyc/service/filter/**,**io/mosip/authentication/staticpin/service/filter/**,**io/mosip/authentication/common/service/entity/**,**/service/IdAuthenticationApplication.java,**/service/**/*Entity.java,**internal/service/InternalAuthenticationApplication.java,**kyc/service/KycAuthenticationApplication.java,**spin/service/StaticPinAuthenticationApplication.java,**io/mosip/authentication/common/service/repository/**,**authentication/otp/service/OtpApplication.java,**authentication/staticpin/service/StaticPinApplication.java,**/authentication/vid/service/VidApplication.java,**/authentication/core/spi/indauth/match/**</sonar.exclusions>

		<maven.jar.plugin.version>3.0.2</maven.jar.plugin.version>
		<maven.war.plugin.version>3.1.0</maven.war.plugin.version>
		
		<io.micrometer.prometheus.version>1.4.2</io.micrometer.prometheus.version>

	</properties>

	<dependencies>
		<!-- JUnit -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<!-- Lombok -->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>${lombok.version}</version>
			<scope>compile</scope>
		</dependency>
		<!-- Swagger -->
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger2</artifactId>
			<version>${maven.swagger.version}</version>
		</dependency>
		<dependency>
			<groupId>io.springfox</groupId>
			<artifactId>springfox-swagger-ui</artifactId>
			<version>${maven.swagger.version}</version>
		</dependency>
		<!-- TODO - Check if below dependency can be added only in service -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-webflux</artifactId>
			<version>${spring.boot.version}</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven.compiler.version}</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
				</configuration>
			</plugin>
<!--			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven.javadoc.version}</version>
				<configuration>
					<aggregate>true</aggregate>
				</configuration>
			</plugin>
-->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9.1</version>
				<executions>
					<execution>
					 	<id>attach-javadocs</id>
					  	<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
                         		<additionalJOption>-Xdoclint:none</additionalJOption>
                	  	</configuration>
                	</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.7</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>false</autoReleaseAfterClose>
				</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>
				  <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.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${maven.jacoco.version}</version>
				<configuration>
					<excludes>
						<exclude>**/constant/**</exclude>
						<exclude>**/config/**</exclude>
						<exclude>**/dto/**</exclude>
						<exclude>io/mosip/authentication/service/*.class</exclude>
						<exclude>io/mosip/authentication/service/filter/**</exclude>
					</excludes>
				</configuration>
				<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.sonarsource.scanner.maven</groupId>
				<artifactId>sonar-maven-plugin</artifactId>
				<version>${maven.sonar.version}</version>
					<executions>
						<execution>
							<phase>verify</phase>
							<goals>
								<goal>sonar</goal>
							</goals>
						</execution>
					</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>${maven.jar.plugin.version}</version>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<Project-Name>${project.name}</Project-Name>
							<Project-Version>${project.version}</Project-Version>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>${maven.war.plugin.version}</version>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
						</manifest>
						<manifestEntries>
							<Project-Name>${project.name}</Project-Name>
							<Project-Version>${project.version}</Project-Version>
						</manifestEntries>
					</archive>
				</configuration>
			</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>DEV</id> <properties> <sonar.host.url> http://13.76.43.109:9000 
		</sonar.host.url> <sonar.login> d9be047d5a47b63c4e9d5a5d0dc2511fa46ea624 
		</sonar.login> <sonar.projectName>IdAuthentication</sonar.projectName> <sonar.projectVersion>0.7.0</sonar.projectVersion> 
		<sonar.jacoco.reportPaths> target/jacoco.exec </sonar.jacoco.reportPaths> 
		</properties> </profile> <profile> <id>LOCAL</id> <properties> <sonar.host.url> 
		http://104.215.158.154:9000 </sonar.host.url> <sonar.login>810793386f5e1c82252f900fe5c4cb99653eefd6</sonar.login> 
		<sonar.projectName>IdAuthentication</sonar.projectName> <sonar.projectVersion>0.7.0</sonar.projectVersion> 
		<sonar.jacoco.reportPaths> target/jacoco.exec </sonar.jacoco.reportPaths> 
		</properties> </profile> </profiles> -->

</project>
