<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://maven.apache.org/POM/4.0.0"
	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.kernel</groupId>

	<artifactId>kernel-auth-service</artifactId>
	<packaging>jar</packaging>
	<version>1.2.1-rc1</version>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<jacoco.maven.plugin.version>0.8.11</jacoco.maven.plugin.version>
		<!-- maven -->
		<maven.compiler.source>21</maven.compiler.source>
		<maven.compiler.target>21</maven.compiler.target>
		<maven.compiler.version>3.8.0</maven.compiler.version>
		<!-- <maven.surefire.plugin.version>2.22.0</maven.surefire.plugin.version> -->
		<springdoc.openapi.version>2.6.0</springdoc.openapi.version>
		<maven.jar.plugin.version>3.0.2</maven.jar.plugin.version>
		<maven.war.plugin.version>3.1.0</maven.war.plugin.version>
		<!-- <maven.jacoco.plugin.version>0.8.1</maven.jacoco.plugin.version> -->
		<!-- <maven.sonar.plugin.version>3.7.0.1746</maven.sonar.plugin.version> -->
		<maven.javadoc.plugin.version>3.2.0</maven.javadoc.plugin.version>
		<maven-shade-plugin.version>2.3</maven-shade-plugin.version>

		<kernel-openid-bridge-api.version>1.2.1-rc1</kernel-openid-bridge-api.version>
		<sonar.coverage.exclusions>**/constant/**,**/config/**,**/httpfilter/**,**/cache/**,**/entity/**,**/model/**,**/exception/**,**/repository/**,**/verticle/**,**/spi/**,"**/proxy/**","**/ProxyAuthServiceImpl.java","**/ProxyOTPServiceImpl.java","**/dto/**","**/util/**","**/filter/**","**/intercepter/**","**/AuthBootApplication.java"</sonar.coverage.exclusions>
		<sonar.cpd.exclusions>**/dto/**,**/entity/**,**/config/**,"**/ProxyAuthServiceImpl.java","**/ProxyTokenGenerator.java"</sonar.cpd.exclusions>
		
		<apache.directory.api.version>2.0.1</apache.directory.api.version>
		<maven.deploy.plugin.version>3.1.1</maven.deploy.plugin.version>
		<central.publishing.maven.plugin.version>0.7.0</central.publishing.maven.plugin.version>
		<maven.source.plugin.version>3.3.1</maven.source.plugin.version>
		<maven.gpg.plugin.version>3.2.3</maven.gpg.plugin.version>
		<git.commit.id.plugin.version>3.0.1</git.commit.id.plugin.version>
		<maven.surefire.plugin.version>3.1.2</maven.surefire.plugin.version>
		<spring.boot.maven.plugin.version>3.2.0</spring.boot.maven.plugin.version>

		<!-- Mosip -->
		<kernel.bom.version>1.2.1-rc1</kernel.bom.version>
		<kernel.core.version>1.2.1-rc1</kernel.core.version>
	</properties>
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.mosip.kernel</groupId>
				<artifactId>kernel-bom</artifactId>
				<version>${kernel.bom.version}</version>
				<type>pom</type>
			    <scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.keycloak.bom</groupId>
				<artifactId>keycloak-adapter-bom</artifactId>
				<version>6.0.1</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-core</artifactId>
			<version>${kernel.core.version}</version>
		</dependency>
		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-openid-bridge-api</artifactId>
			<version>${kernel-openid-bridge-api.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-starter-config</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-security</artifactId>
		</dependency>
		 <dependency>
        		<groupId>org.springdoc</groupId>
        		<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
			 <version>${springdoc.openapi.version}</version>
    		</dependency>
		<dependency>
			<groupId>io.jsonwebtoken</groupId>
			<artifactId>jjwt</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.directory.api</groupId>
			<artifactId>api-all</artifactId>
			<version>${apache.directory.api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
		</dependency>
		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-templatemanager-velocity</artifactId>
			<version>1.2.1-rc1</version>
		</dependency>
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
		</dependency>
		<dependency>
			<groupId>com.auth0</groupId>
			<artifactId>java-jwt</artifactId>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-undertow -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-undertow</artifactId>
		</dependency>
		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-logger-logback</artifactId>
			<version>1.2.1-rc1</version>
		</dependency>
		<dependency>
			<groupId>org.springdoc</groupId>
			<artifactId>springdoc-openapi-ui</artifactId>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<optional>true</optional>
		</dependency>
			<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
			<exclusions>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
		    <groupId>org.hibernate.validator</groupId>
		    <artifactId>hibernate-validator</artifactId>
		</dependency>
	</dependencies>
	<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>
	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<version>${spring.boot.maven.plugin.version}</version>
				<configuration>
					<executable>true</executable>
					<layout>ZIP</layout>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>build-info</goal>
							<goal>repackage</goal>
						</goals>
						<configuration>
							<attach>false</attach>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>${maven.deploy.plugin.version}</version>
				<configuration>
					<skip>true</skip>
				</configuration>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>none</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
						<configuration>
							<skip>true</skip>
						</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.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<inherited>true</inherited>
				<version>${maven.source.plugin.version}</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>${maven.javadoc.plugin.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>${maven.gpg.plugin.version}</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>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>${git.commit.id.plugin.version}</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}/service-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>false</skipTests>
					<skip>false</skip>
					<argLine>
						${argLine} --add-opens
						java.xml/jdk.xml.internal=ALL-UNNAMED
						--illegal-access=permit
					</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco.maven.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>
		</plugins>
	</build>
	<scm>
		<connection>scm:git:git://github.com/mosip/commons.git</connection>
		<developerConnection>scm:git:ssh://github.com:mosip/commons.git</developerConnection>
		<url>https://github.com/mosip/commons</url>
		<tag>HEAD</tag>
	</scm>
	<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/commons</organizationUrl>
		</developer>
	</developers>
	<name>Auth service</name>
	<description>Auth service acts as intermediatory between open id and mosip services </description>
	<url>https://github.com/mosip/commons</url>
	<profiles>
		<profile>
			<id>openapi-doc-generate-profile</id>
			<dependencies>
				<dependency>
					<groupId>io.mosip.kernel</groupId>
					<artifactId>kernel-auth-adapter</artifactId>
					<version>${project.version}</version>
				</dependency>
			</dependencies>
			<build>
				<plugins>
					<plugin>
						<groupId>org.springframework.boot</groupId>
						<artifactId>spring-boot-maven-plugin</artifactId>
						<version>${spring.boot.version}</version>
						<configuration>
							<executable>true</executable>
							<layout>ZIP</layout>
						</configuration>
						<executions>
							<!-- Build info and repackage -->
							<execution>
								<id>build-info-repackage</id>
								<goals>
									<goal>build-info</goal>
									<goal>repackage</goal>
								</goals>
								<configuration>
									<attach>false</attach>
								</configuration>
							</execution>

							<!-- Integration test startup -->
							<execution>
								<id>pre-integration-test</id>
								<phase>pre-integration-test</phase>
								<goals>
									<goal>start</goal>
								</goals>
								<configuration>
									<folders>
										<folder>src/test/resources</folder>
									</folders>
									<profiles>
										<profile>openapi-profile</profile>
									</profiles>
									<arguments>
										<argument>--server.port=8090</argument>
										<argument>--server.servlet.path=/app/generic</argument>
									</arguments>
								</configuration>
							</execution>

							<!-- Integration test shutdown -->
							<execution>
								<id>post-integration-test</id>
								<phase>post-integration-test</phase>
								<goals>
									<goal>stop</goal>
								</goals>
							</execution>
						</executions>
					</plugin>					<plugin>
						<groupId>org.springdoc</groupId>
						<artifactId>springdoc-openapi-maven-plugin</artifactId>
						<version>0.2</version>
						<executions>
							<execution>
								<id>integration-test</id>
								<goals>
									<goal>generate</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	</project>
