<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.testrig.apitest.commons</groupId>
	<artifactId>apitest-commons</artifactId>
	<packaging>jar</packaging>
	<name>apitest-commons</name>
	<description>Parent project of MOSIP functional tests</description>
	<url>https://github.com/mosip/mosip-functional-tests</url>
	<version>1.3.2</version>

	<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/mosip-functional-tests.git</connection>
		<developerConnection>scm:git:ssh://github.com:mosip/mosip-functional-tests.git</developerConnection>
		<url>https://github.com/mosip/mosip-functional-tests</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/mosip-functional-tests</organizationUrl>
		</developer>
	</developers>

	<properties>
		<!-- kernel versions -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<kernel-websubclient-api.version>1.3.0-beta.1</kernel-websubclient-api.version>

		<!-- maven -->
		<maven.compiler.target>21</maven.compiler.target>
		<maven.compiler.source>21</maven.compiler.source>
		<maven.compiler.version>3.8.0</maven.compiler.version>
		<maven.jar.plugin.version>3.0.2</maven.jar.plugin.version>
		<maven.war.plugin.version>3.1.0</maven.war.plugin.version>
		<maven.sonar.plugin.version>3.7.0.1746</maven.sonar.plugin.version>

		<!-- utilities -->
		<commons-codec>1.15</commons-codec>
		<commons.beanutils.version>1.10.1</commons.beanutils.version>
		<velocity.version>1.7</velocity.version>
		<icu4j.version>63.1</icu4j.version>
		<hadoop-client>2.8.1</hadoop-client>
		<aws.javasdk.version>1.11.368</aws.javasdk.version>

		<!-- Hibernate version -->
		<hibernate.version>5.2.17.Final</hibernate.version>

		<!-- automationtests version -->
		<wink-json4j-provider.version>1.1.2-incubating</wink-json4j-provider.version>
		<kernel.version>1.3.0-beta.1</kernel.version>
		<zjsonpatch.version>0.4.7</zjsonpatch.version>
		<extentreports.aventstack.version>3.0.0</extentreports.aventstack.version>
		<extentreports.relevantcodes.version>2.41.2</extentreports.relevantcodes.version>
		<maven.model.version>3.3.9</maven.model.version>
		<testng.version>7.11.0</testng.version>
		<zt.zip.version>1.13</zt.zip.version>
		<fileName>apitest-commons-1.3.2-jar-with-dependencies</fileName>
	</properties>
	
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.opencsv</groupId>
			<artifactId>opencsv</artifactId>
			<version>4.1</version>
		</dependency>

		<dependency>
			<groupId>com.slack.api</groupId>
			<artifactId>slack-api-client</artifactId>
			<version>1.6.1-RC1</version>
		</dependency>
		
		<dependency>
			<groupId>com.github.javafaker</groupId>
			<artifactId>javafaker</artifactId>
			<version>1.0.2</version>
		</dependency>

		<!-- for translation -->
		<dependency>
			<groupId>com.ibm.icu</groupId>
			<artifactId>icu4j</artifactId>
			<version>${icu4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.keycloak</groupId>
			<artifactId>keycloak-admin-client</artifactId>
			<version>17.0.1</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.javassist/javassist -->
		<dependency>
			<groupId>org.javassist</groupId>
			<artifactId>javassist</artifactId>
		</dependency>
		<dependency>
			<!-- keep the version of this 3 or below 3 else it will convert = to &#x3D; 
				ref: https://github.com/handlebars-lang/handlebars.js/issues/1489 -->
			<groupId>com.github.jknack</groupId>
			<artifactId>handlebars</artifactId>
			<version>3.0.0</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-collections4</artifactId>
		</dependency>

		<dependency>
			<groupId>io.jsonwebtoken</groupId>
			<artifactId>jjwt</artifactId>
		</dependency>
		<dependency>
			<groupId>com.flipkart.zjsonpatch</groupId>
			<artifactId>zjsonpatch</artifactId>
			<version>${zjsonpatch.version}</version>
		</dependency>
		<dependency>
			<groupId>com.amazonaws</groupId>
			<artifactId>aws-java-sdk</artifactId>
			<version>${aws.javasdk.version}</version>
		</dependency>
		<dependency>
			<groupId>com.aventstack</groupId>
			<artifactId>extentreports</artifactId>
			<version>${extentreports.aventstack.version}</version>
		</dependency>
		<dependency>
			<groupId>com.relevantcodes</groupId>
			<artifactId>extentreports</artifactId>
			<version>${extentreports.relevantcodes.version}</version>
		</dependency>
		<dependency>
			<groupId>com.jayway.jsonpath</groupId>
			<artifactId>json-path</artifactId>
		</dependency>

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-model</artifactId>
			<version>${maven.model.version}</version>
		</dependency>
		<dependency>
			<groupId>io.rest-assured</groupId>
			<artifactId>rest-assured</artifactId>
		</dependency>

		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>${testng.version}</version>
		</dependency>
		<dependency>
			<groupId>org.zeroturnaround</groupId>
			<artifactId>zt-zip</artifactId>
			<version>${zt.zip.version}</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-core</artifactId>
		</dependency>

		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
		</dependency>

		<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-annotations -->
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-annotations</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.dataformat</groupId>
			<artifactId>jackson-dataformat-xml</artifactId>
		</dependency>
		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
		</dependency>
		<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-assembly-plugin</artifactId>
			<version>3.1.0</version>
		</dependency>
		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>${hibernate.version}</version>
		</dependency>
		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<version>${commons.beanutils.version}</version>
		</dependency>
		<dependency>
			<groupId>javax.validation</groupId>
			<artifactId>validation-api</artifactId>
		</dependency>
		<dependency>
			<groupId>io.swagger</groupId>
			<artifactId>swagger-annotations</artifactId>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.datatype</groupId>
			<artifactId>jackson-datatype-jsr310</artifactId>
		</dependency>
		<dependency>
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>net.lingala.zip4j</groupId>
			<artifactId>zip4j</artifactId>
			<version>2.11.5</version>
		</dependency>

		<dependency>
			<groupId>com.jamesmurty.utils</groupId>
			<artifactId>java-xmlbuilder</artifactId>
			<version>1.3</version>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpcore</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.hadoop</groupId>
			<artifactId>hadoop-client</artifactId>
			<version>${hadoop-client}</version>
			<exclusions>
				<exclusion>
					<groupId>org.codehaus.jackson</groupId>
					<artifactId>jackson-jaxrs</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>

		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
		<dependency>
			<groupId>com.google.zxing</groupId>
			<artifactId>core</artifactId>
			<version>3.3.3</version>
		</dependency>

		<dependency>
			<groupId>com.google.zxing</groupId>
			<artifactId>javase</artifactId>
			<version>2.0</version>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-all</artifactId>
			<version>1.3</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.velocity</groupId>
			<artifactId>velocity</artifactId>
			<version>${velocity.version}</version>
		</dependency>

		<dependency>
			<groupId>com.itextpdf</groupId>
			<artifactId>html2pdf</artifactId>
			<version>2.0.0</version>
		</dependency>

		<dependency>
			<groupId>com.itextpdf</groupId>
			<artifactId>itextpdf</artifactId>
			<version>5.5.13.4</version>
		</dependency>

		<dependency>
			<groupId>de.mkammerer</groupId>
			<artifactId>argon2-jvm</artifactId>
			<version>2.9.1</version>
		</dependency>

		<dependency>
			<groupId>com.github.mifmif</groupId>
			<artifactId>generex</artifactId>
			<version>1.0.2</version>
		</dependency>

		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>javax.mail-api</artifactId>
			<version>1.6.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.wink</groupId>
			<artifactId>wink-json4j-provider</artifactId>
			<version>${wink-json4j-provider.version}</version>
		</dependency>
		<dependency>
			<groupId>org.checkerframework</groupId>
			<artifactId>checker-qual</artifactId>
			<version>2.9.0</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.activemq/activemq-broker -->
		<dependency>
			<groupId>org.apache.activemq</groupId>
			<artifactId>activemq-broker</artifactId>
		</dependency>
		<!-- Lombok -->
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-batch</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hibernate.validator</groupId>
			<artifactId>hibernate-validator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcprov-jdk15on</artifactId>
			<version>1.70</version>
		</dependency>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcpkix-jdk15on</artifactId>
			<version>1.70</version>
		</dependency>
		<dependency>
			<groupId>io.mosip.mock.mds</groupId>
			<artifactId>mock-mds</artifactId>
			<version>1.3.0-beta.1</version>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
		</dependency>
		<dependency>
			<groupId>com.auth0</groupId>
			<artifactId>java-jwt</artifactId>
			<version>4.4.0</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.tyrus.bundles</groupId>
			<artifactId>tyrus-standalone-client</artifactId>
			<version>1.13.1</version>
		</dependency>
		<dependency>
			<groupId>io.mosip.authentication</groupId>
			<artifactId>authentication-core</artifactId>
			<version>1.2.0.1-B3</version>
			<exclusions>
				<exclusion>
					<groupId>commons-codec</groupId>
					<artifactId>commons-codec</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-core</artifactId>
			<version>${kernel.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-starter-security</artifactId>
				</exclusion>
				<exclusion>
					<groupId>commons-codec</groupId>
					<artifactId>commons-codec</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.bouncycastle</groupId>
					<artifactId>bcprov-jdk15on</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.bouncycastle</groupId>
					<artifactId>bcpkix-jdk15on</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-websubclient-api</artifactId>
			<version>${kernel-websubclient-api.version}</version>
		</dependency>

		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-templatemanager-velocity</artifactId>
			<version>1.3.0-beta.1</version>
		</dependency>

		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-keymanager-service</artifactId>
			<version>1.3.0-beta.1</version>
			<classifier>lib</classifier>
			<exclusions>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-starter-security</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.bouncycastle</groupId>
					<artifactId>bcprov-jdk15on</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.bouncycastle</groupId>
					<artifactId>bcpkix-jdk15on</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.hibernate.orm</groupId>
					<artifactId>hibernate-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpmime</artifactId>
				<version>4.5.14</version>
			</dependency>

			<dependency>
				<groupId>commons-codec</groupId>
				<artifactId>commons-codec</artifactId>
				<version>${commons-codec}</version>
			</dependency>
			<dependency>
				<groupId>io.mosip.kernel</groupId>
				<artifactId>kernel-bom</artifactId>
				<version>1.3.0-beta.1</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<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-compiler-plugin</artifactId>
				<version>${maven.compiler.version}</version>
				<configuration>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
					<argLine>-Dfile.encoding=UTF-8</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<doclint>none</doclint>
				</configuration>
			</plugin>
			<plugin>
				<groupId>pl.project13.maven</groupId>
				<artifactId>git-commit-id-plugin</artifactId>
				<version>3.0.1</version>
				<executions>
					<execution>
						<id>populate-git-commit-information</id>
						<goals>
							<goal>revision</goal>
						</goals>
						<configuration>
							<verbose>true</verbose>
							<dateFormat>MM/dd/yyyy HH:mm:ss Z</dateFormat>
							<abbrevLength>8</abbrevLength>
							<generateGitPropertiesFile>true</generateGitPropertiesFile>
							<generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
						</configuration>
					</execution>
				</executions>
				<configuration>
					<dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
				</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>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</execution>
				</executions>
			</plugin>


			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>3.2.4</version>
				<executions>
					<execution>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<finalName>${fileName}</finalName>
							<transformers>
								<!-- need this to merge the services files
								properly -->
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
								<!-- add Main-Class to manifest file -->
								<transformer
									implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<mainClass>
										io.mosip.testrig.apirig.testrunner.MosipTestRunner</mainClass>
								</transformer>
							</transformers>
							<!-- add this to prevent some security issues when
							merging everything together -->
							<filters>
								<filter>
									<artifact>*:*</artifact>
									<excludes>
										<exclude>META-INF/*.SF</exclude>
										<exclude>META-INF/*.DSA</exclude>
										<exclude>META-INF/*.RSA</exclude>
									</excludes>
								</filter>
							</filters>
						</configuration>
					</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>
							<Built-By>${user.name}</Built-By>
							<Built-OS>${os.name}</Built-OS>
							<Local-Build-Date>${maven.build.timestamp}</Local-Build-Date>
							<Build-Number>${env.BUILD_NUMBER}</Build-Number>
							<Build-Date>${env.BUILD_ID}</Build-Date>
							<Build-URL>${env.BUILD_URL}</Build-URL>
						</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>
							<Built-By>${user.name}</Built-By>
							<Built-OS>${os.name}</Built-OS>
							<Local-Build-Date>${maven.build.timestamp}</Local-Build-Date>
							<Build-Number>${env.BUILD_NUMBER}</Build-Number>
							<Build-Date>${env.BUILD_ID}</Build-Date>
							<Build-URL>${env.BUILD_URL}</Build-URL>
						</manifestEntries>
					</archive>
				</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-antrun-plugin</artifactId>
				<version>3.0.0</version>
				<executions>
					<execution>
						<id>make-jar-executable</id>
						<phase>package</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<target>
								<!-- Create a shell script to run the JAR file with executable permission -->
								<chmod file="${project.build.directory}/*.jar" perm="ugo+rx"/>
							</target>
						</configuration>
					</execution>
				</executions>
			</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>
