<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.kernel</groupId>
	<artifactId>kernel-syncdata-service</artifactId>
	<name>kernel-syncdata-service</name>
	<description>Mosip commons project </description>
        <url>https://github.com/mosip/commons</url>
	<version>1.3.0-beta.2</version>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<!-- maven -->
		<maven.compiler.source>21</maven.compiler.source>
		<maven.compiler.target>21</maven.compiler.target>
		<maven.compiler.version>3.9.6</maven.compiler.version>
		<maven.surefire.plugin.version>2.22.0</maven.surefire.plugin.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.version>0.8.11</maven.jacoco.version>
		<maven.sonar.plugin.version>3.7.0.1746</maven.sonar.plugin.version>
		<maven.javadoc.version>3.2.0</maven.javadoc.version>
		<maven-shade-plugin.version>2.3</maven-shade-plugin.version>
		<spring.boot.version>3.2.3</spring.boot.version>
		<!-- data -->
		<h2.version>1.4.197</h2.version>
		<mysql.connector.version>5.1.46</mysql.connector.version>
		<eclipselink.version>2.5.0</eclipselink.version>

		<!-- test -->
		<junit.version>4.12</junit.version>
		<mockito.version>2.23.4</mockito.version>

		<!-- logger -->
		<logback.version>1.2.3</logback.version>
		<slf4j.version>1.7.19</slf4j.version>
		<log4j-over-slf4j>1.7.7</log4j-over-slf4j>
		<jcl.to.slf4j.version>1.7.25</jcl.to.slf4j.version>

		<!-- json -->
		<jackson.version>2.9.5</jackson.version>
		<jackson.datatype.version>2.9.8</jackson.datatype.version>
		<jackson.databind>2.9.6</jackson.databind>
		<json.utility.version>20180130</json.utility.version>
		<json.schema.validator.version>2.2.10</json.schema.validator.version>

		<!-- utilities -->
		<commons-lang3>3.7</commons-lang3>
		<commons-codec>1.11</commons-codec>
		<commons.beanutils.version>1.9.2</commons.beanutils.version>
		<commons.configuration2.version>2.2</commons.configuration2.version>
		<apache.httpcomponents.version>4.5.6</apache.httpcomponents.version>
		<guava.version>19.0</guava.version>
		<jsch.version>0.1.54</jsch.version>
		<sshd.version>1.4.0</sshd.version>
		<itextcore.version>7.1.0</itextcore.version>
		<itexthtml2pdf.version>2.0.0</itexthtml2pdf.version>
		<itext.version>5.5.13</itext.version>
		<freemarker.version>2.3.23</freemarker.version>
		<velocity.version>1.7</velocity.version>
		<velocity.tool.version>2.0</velocity.tool.version>
		<datamapper.orika>1.5.2</datamapper.orika>
		<modelmapper.version>2.1.1</modelmapper.version>
		<bouncycastle.version>1.66</bouncycastle.version>
		<icu4j.version>63.1</icu4j.version>
		<seventeam-otp.version>1.0.0</seventeam-otp.version>
		<google.zxing.version>3.3.3</google.zxing.version>
		<hadoop-client>3.1.0</hadoop-client>
		<htrace-core4>4.1.0-incubating</htrace-core4>
		<aws.javasdk.version>1.11.368</aws.javasdk.version>
		<s3mock.version>0.2.4</s3mock.version>
		<ignite.version>2.3.0</ignite.version>
		<findbugs.version>3.0.1</findbugs.version>
		<byte.buddy.version>1.9.12</byte.buddy.version>
		<io.jsonwebtoken.jjwt.version>0.6.0</io.jsonwebtoken.jjwt.version>
		<apache.directory.api.version>2.0.0.AM2</apache.directory.api.version>
		<aspectjweaver.version>1.8.12</aspectjweaver.version>
		<micrometer.core.version>1.4.2</micrometer.core.version>
		<micrometer.registry.prometheus.version>1.4.2</micrometer.registry.prometheus.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<central.publishing.maven.plugin.version>0.7.0</central.publishing.maven.plugin.version>
		<kernel.core.version>1.3.0-beta.2</kernel.core.version>
		<kernel.auth.adaptor.version>1.3.0-beta.1</kernel.auth.adaptor.version>
		<kernel.logger.version>1.3.0-beta.2</kernel.logger.version>
		<kernel.crypto.version>1.3.0-beta.2</kernel.crypto.version>
		<kernel.keymanager.version>1.3.0-beta.2</kernel.keymanager.version>
		<kernel-websubclient-api.version>1.3.0-beta.2</kernel-websubclient-api.version>
		<maven.deploy.plugin.version>3.1.1</maven.deploy.plugin.version>
	</properties>

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

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>io.mosip.kernel</groupId>
				<artifactId>kernel-bom</artifactId>
				<version>${kernel.core.version}</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>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>1.2</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-security</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-test</artifactId>
		</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-logger-logback</artifactId>
			<version>${kernel.logger.version}</version>
		</dependency>

		<dependency>
			<groupId>jakarta.persistence</groupId>
			<artifactId>jakarta.persistence-api</artifactId>
			<version>3.1.0</version>
		</dependency>
		<dependency>
			<groupId>jakarta.xml.bind</groupId>
			<artifactId>jakarta.xml.bind-api</artifactId>
		</dependency>
		<dependency>
			<groupId>jakarta.activation</groupId>
			<artifactId>jakarta.activation-api</artifactId>
			<version>2.1.3</version>
		</dependency>
		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>tomcat-annotations-api</artifactId>
		</dependency>
		<!--<dependency>
			<groupId>org.hibernate.orm</groupId>
			<artifactId>hibernate-core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hibernate.validator</groupId>
			<artifactId>hibernate-validator</artifactId>
		</dependency>-->

		<dependency>
			<groupId>org.hibernate.orm</groupId>
			<artifactId>hibernate-hikaricp</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-validation</artifactId>
		</dependency>

		<!--<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>${h2.version}</version>
			<scope>test</scope>
		</dependency>-->

		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-auth-adapter</artifactId>
			<version>${kernel.auth.adaptor.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework.boot</groupId>
					<artifactId>spring-boot-starter-webflux</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-keymanager-service</artifactId>
			<version>${kernel.keymanager.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework.security</groupId>
					<artifactId>spring-security-config</artifactId>
				</exclusion>
			</exclusions>
			<classifier>lib</classifier>
		</dependency>

		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>io.mosip.kernel</groupId>
			<artifactId>kernel-websubclient-api</artifactId>
			<version>${kernel-websubclient-api.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-cache</artifactId>
		</dependency>
		<dependency>
		    <groupId>org.springdoc</groupId>
		    <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
		    <version>2.5.0</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-configuration-processor</artifactId>
			<optional>true</optional>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.vintage</groupId>
			<artifactId>junit-vintage-engine</artifactId>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>3.11.2</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</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.apache.maven.plugins</groupId>
		<artifactId>maven-surefire-plugin</artifactId>
		<version>${maven.surefire.plugin.version}</version>
		<configuration>
			<skipTests>false</skipTests>
			<skip>false</skip>
			<useFile>false</useFile>
			<argLine>
				${argLine}
				--add-opens java.xml/jdk.xml.internal=ALL-UNNAMED
				--add-opens java.base/java.lang=ALL-UNNAMED
				--add-modules=ALL-SYSTEM
				--illegal-access=debug
				--enable-preview
			</argLine>
		</configuration>
	</plugin>
	<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-resources-plugin</artifactId>
		<version>3.3.1</version>
		<configuration>
			<nonFilteredFileExtensions>
				<nonFilteredFileExtension>properties</nonFilteredFileExtension>
			</nonFilteredFileExtensions>
		</configuration>
	</plugin>
	<plugin>
		<groupId>org.jacoco</groupId>
		<artifactId>jacoco-maven-plugin</artifactId>
		<version>${maven.jacoco.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.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<version>${spring.boot.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>
				<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>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-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>--pinentry-mode</arg>
                    			<arg>loopback</arg>
                		</gpgArguments>
            		 </configuration>
                        </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}/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>
			<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>
	</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>
	<profiles>
		<profile>
			<id>sonar</id>
			<properties>
				<sonar.sources>.</sonar.sources>
				<sonar.inclusions>src/main/java/**,src/main/resources/**</sonar.inclusions>
				<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>
		<profile>
			<id>openapi-doc-generate-profile</id>
			<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>
						<configuration>
							<apiDocsUrl>http://localhost:8090/app/generic/v3/api-docs/kernel-syncdata-service</apiDocsUrl>
							<outputFileName>${name}-openapi.json</outputFileName>
							<outputDir>${project.build.directory}</outputDir>
							<skip>false</skip>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	</project>
