<?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.2.0</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>

    <repositories>
        <repository>
            <id>ossrh</id>
            <name>CentralRepository</name>
            <url>https://oss.sonatype.org/content/repositories/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://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>

	<modules>
		<module>authentication-core</module>
		<module>authentication-filter-api</module>
		<module>authentication-common</module>
		<module>authentication-authtypelockfilter-impl</module>
		<module>authentication-hotlistfilter-impl</module>
		<module>authentication-service</module>
		<module>authentication-internal-service</module>
		<module>authentication-otp-service</module>
	</modules>

	<properties>
		<authentication.parent.version>${project.version}</authentication.parent.version>
		<authentication-core.version>${authentication.parent.version}</authentication-core.version>
		<authentication-filter-api.version>${authentication.parent.version}</authentication-filter-api.version>
		<authentication-common.version>${authentication.parent.version}</authentication-common.version>
		<authentication-authtypelockfilter-impl.version>${authentication.parent.version}</authentication-authtypelockfilter-impl.version>
		<authentication-hotlistfilter-impl.version>${authentication.parent.version}</authentication-hotlistfilter-impl.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- Kernel components -->
		<kernel.parent.version>1.2.0</kernel.parent.version>
		<kernel-core.version>${kernel.parent.version}</kernel-core.version>
		<kernel-keymanager-service.version>${kernel.parent.version}</kernel-keymanager-service.version>
		<kernel-idgenerator-tokenid.version>${kernel.parent.version}</kernel-idgenerator-tokenid.version>
		<kernel-idobjectvalidator.version>${kernel.parent.version}</kernel-idobjectvalidator.version>
		<kernel-pinvalidator.version>${kernel.parent.version}</kernel-pinvalidator.version>
		<kernel-templatemanager-velocity.version>${kernel.parent.version}</kernel-templatemanager-velocity.version>
		<kernel-logger-logback.version>${kernel.parent.version}</kernel-logger-logback.version>
		<kernel-dataaccess-hibernate.version>${kernel.parent.version}</kernel-dataaccess-hibernate.version>
		<kernel-cbeffutil-api.version>${kernel.parent.version}</kernel-cbeffutil-api.version>
		<kernel-templatemanager-velocity.version>${kernel.parent.version}</kernel-templatemanager-velocity.version>
		<kernel-auth-adapter.version>${kernel.parent.version}</kernel-auth-adapter.version>
		<kernel-biometrics-api.version>${kernel.parent.version}</kernel-biometrics-api.version>
		<kernel-biosdk-provider.version>${kernel.parent.version}</kernel-biosdk-provider.version>
		<kernel-websubclient-api.version>${kernel.parent.version}</kernel-websubclient-api.version>
		<id-repository-core.version>1.2.0</id-repository-core.version>
		<json.utility.version>20180130</json.utility.version>
		<kernel-demoapi.version>${kernel.parent.version}</kernel-demoapi.version>
		<kernel-idauthenticationfilter-api.version>${kernel.parent.version}</kernel-idauthenticationfilter-api.version>
		<!-- Maven Plugins -->
		<maven.compiler.source>11</maven.compiler.source>
		<maven.compiler.target>11</maven.compiler.target>
		<maven.compiler.version>3.8.0</maven.compiler.version>
		<maven.javadoc.version>3.2.0</maven.javadoc.version>
		<maven.swagger.version>2.9.2</maven.swagger.version>
		<maven.jacoco.version>0.8.5</maven.jacoco.version>
		<maven.sonar.version>3.7.0.1746</maven.sonar.version>
		<powermock.version>2.0.0</powermock.version>
		<maven.surefire.plugin.version>2.22.0</maven.surefire.plugin.version>

		<!-- Test & Logging -->
		<junit.version>4.13.1</junit.version>
		<mockito.version>2.23.4</mockito.version>
		<byte-buddy.version>1.9.3</byte-buddy.version>

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

		<!-- Spring Boot -->
		<spring.boot.version>2.0.2.RELEASE</spring.boot.version>
		<spring.batch.version>4.0.1.RELEASE</spring.batch.version>
		<spring.security.test.version>5.0.5.RELEASE</spring.security.test.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.12.1</jackson.version>
		<postgresql.version>42.2.2</postgresql.version>

		<!-- Commons -->
		<commons.lang.version>3.7</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>

		<objenesis.version>3.1</objenesis.version>

		<springdoc.version>1.5.10</springdoc.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>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.3.1</version>
		</dependency>
		<dependency>
			<groupId>org.javassist</groupId>
			<artifactId>javassist</artifactId>
			<version>3.27.0-GA</version>
		</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>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-core</artifactId>
			<version>${kernel-core.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>
						spring-boot-starter-security
					</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupId>org.springdoc</groupId>
			<artifactId>springdoc-openapi-ui</artifactId>
			<version>${springdoc.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<version>${spring.boot.version}</version>
			<optional>true</optional>
		</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>3.2.0</version>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<doclint>none</doclint>
				</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.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>
			<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>
		</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> -->
		
		<profiles>
			<profile>
				<id>sonar</id>
				<build>
					<plugins>
						<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>
					</plugins>
				</build>
			</profile>
		</profiles>

</project>
