<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.4.10</version>
    </parent>

    <name>verify-service-parent</name>
    <groupId>io.inji.verify</groupId>
    <artifactId>verify-service-parent</artifactId>
    <version>0.18.0</version>
    <description>Parent project of Inji verify backend service</description>
    <url>https://github.com/inji/inji-verify</url>
    <packaging>pom</packaging>
    <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/inji/inji-verify.git</connection>
        <developerConnection>scm:git:ssh://github.com:inji/inji-verify.git</developerConnection>
        <url>https://github.com/inji/inji-verify</url>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <name>Mosip</name>
            <email>mosip.emailnotifier@gmail.com</email>
            <organization>io.inji</organization>
            <organizationUrl>https://github.com/inji/inji-verify</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>ossrh-inji</id>
            <name>CentralRepositoryInji</name>
            <url>https://central.sonatype.com/repository/maven-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>
        <repository>
            <id>danubetech</id>
            <name>danubetech</name>
            <layout>default</layout>
            <url>https://repo.danubetech.com/repository/maven-public/</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>google</id>
            <name>GoogleMaven</name>
            <layout>default</layout>
            <url>https://maven.google.com</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>

    </repositories>

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

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <maven.compiler.version>3.8.1</maven.compiler.version>
        <java.version>21</java.version>
        <maven.jar.plugin.version>3.3.0</maven.jar.plugin.version>
        <maven.war.plugin.version>3.3.2</maven.war.plugin.version>
        <maven.javadoc.version>3.6.3</maven.javadoc.version>
        <spring.version>3.4.10</spring.version>
        <springdoc.version>2.8.10</springdoc.version>
        <jakarta-servlet.version>6.0.0</jakarta-servlet.version>
        <jakarta-validation.version>3.0.2</jakarta-validation.version>
        <lombok.version>1.18.30</lombok.version>
        <hsqldb.version>2.7.4</hsqldb.version>
        <identity-credential.version>20231002</identity-credential.version>
        <ld-signatures-java.version>1.11.0</ld-signatures-java.version>
        <jsonld-common-java.version>1.8.0</jsonld-common-java.version>
        <vcverifier-jar.version>1.8.0</vcverifier-jar.version>
        <json.version>20240303</json.version>
        <bouncycastle.version>1.78</bouncycastle.version>
        <java-jwt.version>3.18.1</java-jwt.version>
        <tink.version>1.16.0</tink.version>
        <nimbusds-jiose-jwt.version>9.37.4</nimbusds-jiose-jwt.version>
        <pixelpass-jar.version>0.8.0</pixelpass-jar.version>
    </properties>

    <modules>
        <module>verify-service</module>
    </modules>
    <build>
        <plugins>
            <plugin>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-maven-plugin</artifactId>
                <version>1.18.20.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.projectlombok</groupId>
                        <artifactId>lombok</artifactId>
                        <version>${lombok.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>delombok</goal>
                        </goals>
                        <configuration>
                            <addOutputDirectory>false</addOutputDirectory>
                            <sourceDirectory>src/main/java</sourceDirectory>
                            <outputDirectory>${project.build.directory}/delombok</outputDirectory>
                        </configuration>
                    </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>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-compiler-plugin</artifactId>
                <version>${maven.compiler.version}</version>
                <configuration>
                    <forceJavacCompilerUse>true</forceJavacCompilerUse>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </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>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jar.plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <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.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.7.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>ossrh</publishingServerId>
                    <autoPublish>false</autoPublish>
                </configuration>
            </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>
                    <sourcepath>${project.build.directory}/delombok</sourcepath>
                </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.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.12</version>
                <configuration>
                    <output>file</output>
                    <append>true</append>
                </configuration>
                <executions>
                    <execution>
                        <id>jacoco-initialize</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-site</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
