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

  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.1.4</version>
    <relativePath /> <!-- lookup parent from repository -->
  </parent>

  <groupId>ga.rugal</groupId>
  <artifactId>parent</artifactId>
  <version>1.17.0</version>

  <packaging>pom</packaging>

  <name>Parent POM object for Rugal</name>
  <description>This is to simplify Spring Boot based project configuration</description>
  <url>https://github.com/Rugal/${project.artifactId}</url>

  <issueManagement>
    <system>github</system>
    <url>${project.url}/issues</url>
  </issueManagement>

  <scm>
    <connection>scm:git:ssh://git@github.com/Rugal/${project.artifactId}.git</connection>
    <developerConnection>${project.scm.connection}</developerConnection>
    <url>${project.url}</url>
    <tag>v1.17.0</tag>
  </scm>

  <developers>
    <developer>
      <name>Rugal Bernstein</name>
      <email>this@rug.al</email>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <properties>
    <!--
        configuration
    -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>17</java.version>
    <!-- kotlin -->
    <kotlin.version>1.9.0</kotlin.version>
    <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
    <!-- repository -->
    <sonatype.snapshot>https://oss.sonatype.org/content/repositories/snapshots</sonatype.snapshot>
    <sonatype.staging>https://oss.sonatype.org/service/local/staging/deploy/maven2/</sonatype.staging>
    <sonatype.release>https://oss.sonatype.org/content/repositories/releases/</sonatype.release>
    <!-- test toggle -->
    <skip.surefire.tests>true</skip.surefire.tests>
    <skip.failsafe.tests>true</skip.failsafe.tests>
    <!-- surefire -->
    <surefire.report.path>${project.build.directory}/surefire-reports</surefire.report.path>
    <surefire.agent.path>${surefire.report.path}/jacoco.exec</surefire.agent.path>
    <jacoco.surefire.report.path>${project.reporting.outputDirectory}/jacoco/surefire</jacoco.surefire.report.path>
    <!-- failsafe -->
    <failsafe.report.path>${project.build.directory}/failsafe-reports</failsafe.report.path>
    <failsafe.agent.path>${failsafe.report.path}/jacoco.exec</failsafe.agent.path>
    <jacoco.failsafe.report.path>${project.reporting.outputDirectory}/jacoco/failsafe</jacoco.failsafe.report.path>
    <!-- overall -->
    <overall.report.path>${project.build.directory}/overall-reports</overall.report.path>
    <overall.agent.path>${overall.report.path}/jacoco.exec</overall.agent.path>
    <jacoco.overall.report.path>${project.reporting.outputDirectory}/jacoco/overall</jacoco.overall.report.path>
    <jacoco.skip.coverage.check>true</jacoco.skip.coverage.check>
    <!-- test coverage -->
    <branch.threshold>0.9</branch.threshold>
    <line.threshold>0.9</line.threshold>
    <!-- openapi codegen server -->
    <openapi.codegen.package.root>${project.groupId}.${project.artifactId}.openapi</openapi.codegen.package.root>
    <openapi.codegen.model.package>${openapi.codegen.package.root}.model</openapi.codegen.model.package>
    <openapi.codegen.api.package>${openapi.codegen.package.root}.api</openapi.codegen.api.package>
    <openapi.codegen.invoker.package>${openapi.codegen.package.root}.invoker</openapi.codegen.invoker.package>
    <openapi.codegen.skipIfSpecIsUnchanged>true</openapi.codegen.skipIfSpecIsUnchanged>
    <!-- graphql codegen -->
    <graphql.package.name>${project.groupId}.${project.artifactId}.graphql</graphql.package.name>
    <graphql.schema.path>src/main/resources/graphql</graphql.schema.path>
    <!-- checkstyle -->
    <checkstyle.exclusion>target/**/*,**/dto/**/*, **/ExceptionController.java</checkstyle.exclusion>
    <!-- azure -->
    <azure.function.name>${project.artifactId}</azure.function.name>
    <azure.resourceGroup>eastus2-206136</azure.resourceGroup>
    <azure.servicePlanName>ASP-eastus2206136-837f</azure.servicePlanName>
    <!-- refers https://github.com/microsoft/azure-maven-plugins/wiki/Azure-Functions:-Configuration-Details#supported-regions for all valid values -->
    <azure.region>eastus2</azure.region>
    <azure.stagingDirectory>${project.build.directory}/azure-functions/${azure.function.name}</azure.stagingDirectory>
    <azure.runtime.os>linux</azure.runtime.os>
    <!--
        dependency version
    -->
    <servlet.version>6.0.0</servlet.version>
    <lombok.version>1.18.30</lombok.version>
    <spring.cloud.dependency.version>2022.0.2</spring.cloud.dependency.version>
    <spring.data.dependency.version>2023.0.0</spring.data.dependency.version>
    <spring.boot.dependency.version>3.1.0</spring.boot.dependency.version>
    <mapstruct.version>1.5.5.Final</mapstruct.version>
    <swagger.version>1.6.2</swagger.version>
    <openapi.jackson.version>0.2.1</openapi.jackson.version>
    <springfox.version>3.0.0</springfox.version>
    <springdoc.version>1.2.33</springdoc.version>
    <swagger.parser.version>2.0.18</swagger.parser.version>
    <swagger.codegen.version>2.4.19</swagger.codegen.version>
    <faker.version>1.0.2</faker.version>
    <mockito.version>5.3.1</mockito.version>
    <puppycrawl.version>8.40</puppycrawl.version>
    <javax.inject.version>1</javax.inject.version>
    <maven.plugin.development.version>3.6.0</maven.plugin.development.version>
    <maven.plugin.plugin.version>3.7.0</maven.plugin.plugin.version>
    <testing-harness.version>3.3.0</testing-harness.version>
    <graphql-tool.version>12.0.2</graphql-tool.version>
    <graphql-kickstart.version>12.0.0</graphql-kickstart.version>
    <spring-graphql.version>1.2.3</spring-graphql.version>
    <playground.version>11.1.0</playground.version>
    <dagger.version>2.41</dagger.version>
    <guava.version>30.1.1-jre</guava.version>
    <javax.validation.version>2.0.1.Final</javax.validation.version>
    <jsonwebtoken.version>0.11.2</jsonwebtoken.version>
    <vladmihalcea.version>2.10.1</vladmihalcea.version>
    <geolatte-geom.version>1.8.0</geolatte-geom.version>
    <spotbugs.dependency.version>4.6.0</spotbugs.dependency.version>
    <!-- azure -->
    <azure-function.version>1.3.1</azure-function.version>
    <azure-messaging-eventhubs.version>5.1.1</azure-messaging-eventhubs.version>
    <azure-core.version>1.5.1</azure-core.version>
    <azure-identity.version>1.0.7</azure-identity.version>
    <!-- kotlin -->
    <kotlin-logging.version>5.1.0</kotlin-logging.version>
    <springmockk.version>4.0.2</springmockk.version>
    <!-- jakarta -->
    <jakarta.validation.version>3.0.2</jakarta.validation.version>
    <jakarta.persistence.version>3.1.0</jakarta.persistence.version>
    <jakarta.annotation.version>2.1.1</jakarta.annotation.version>
    <!--
        plugin version
    -->
    <compiler.plugin.version>3.11.0</compiler.plugin.version>
    <git.commit.id.plugin.version>4.0.4</git.commit.id.plugin.version>
    <test.plugin.version>3.1.0</test.plugin.version>
    <source.plugin.version>3.2.0</source.plugin.version>
    <dependency.plugin.version>3.1.2</dependency.plugin.version>
    <jacoco.plugin.version>0.8.8</jacoco.plugin.version>
    <deploy.plugin.version>3.0.0-M1</deploy.plugin.version>
    <nexus.staging.plugin.version>1.6.13</nexus.staging.plugin.version>
    <gpg.plugin.version>1.6</gpg.plugin.version>
    <release.plugin.version>2.5.3</release.plugin.version>
    <checkstyle.plugin.version>3.3.0</checkstyle.plugin.version>
    <findbugs.plugin.version>3.0.5</findbugs.plugin.version>
    <spotbugs.plugin.version>4.7.3.4</spotbugs.plugin.version>
    <pmd.plugin.version>3.21.0</pmd.plugin.version>
    <flyway.version>6.5.5</flyway.version>
    <buildplan.plugin.version>1.3</buildplan.plugin.version>
    <openapi.plugin.version>6.6.0</openapi.plugin.version>
    <build.helper.plugin.version>3.4.0</build.helper.plugin.version>
    <sisu.plugin.version>0.3.4</sisu.plugin.version>
    <commitlinter.plugin.version>1.5.0</commitlinter.plugin.version>
    <graphql-codegen.plugin.version>5.8.0</graphql-codegen.plugin.version>
    <docck.plugin.version>1.1</docck.plugin.version>
    <jxr.plugin.version>3.1.1</jxr.plugin.version>
    <site.plugin.version>3.10.0</site.plugin.version>
    <project.info.plugin.version>3.2.1</project.info.plugin.version>
    <assembly.plugin.version>3.4.2</assembly.plugin.version>
    <!-- azure -->
    <azure-function.plugin.version>1.8.0</azure-function.plugin.version>
    <!-- kotlin -->
    <detekt.plugin.version>1.23.1</detekt.plugin.version>
    <dokka.plugin.version>1.8.20</dokka.plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!--
          dependecy train
      -->
      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${spring.cloud.dependency.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-bom</artifactId>
        <version>${spring.data.dependency.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>
      <!--
          servlet
      -->
      <dependency>
        <groupId>jakarta.servlet</groupId>
        <artifactId>jakarta.servlet-api</artifactId>
        <version>${servlet.version}</version>
        <scope>provided</scope>
      </dependency>
      <!-- kotlin -->
      <dependency>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-stdlib</artifactId>
        <version>${kotlin.version}</version>
      </dependency>
      <dependency>
        <groupId>io.github.oshai</groupId>
        <artifactId>kotlin-logging-jvm</artifactId>
        <version>${kotlin-logging.version}</version>
      </dependency>
      <!-- jakarta adoption -->
      <dependency>
        <groupId>jakarta.annotation</groupId>
        <artifactId>jakarta.annotation-api</artifactId>
        <version>${jakarta.annotation.version}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.persistence</groupId>
        <artifactId>jakarta.persistence-api</artifactId>
        <version>${jakarta.persistence.version}</version>
      </dependency>
      <dependency>
        <groupId>jakarta.validation</groupId>
        <artifactId>jakarta.validation-api</artifactId>
        <version>${jakarta.validation.version}</version>
      </dependency>
      <!--
          codegen
      -->
      <!-- mapstruct -->
      <dependency>
        <groupId>org.mapstruct</groupId>
        <artifactId>mapstruct</artifactId>
        <version>${mapstruct.version}</version>
      </dependency>
      <!-- swagger annotation -->
      <dependency>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-annotations</artifactId>
        <version>${swagger.version}</version>
      </dependency>
      <!-- swagger codegen -->
      <dependency>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-codegen</artifactId>
        <version>${swagger.codegen.version}</version>
      </dependency>
      <!-- swagger UI -->
      <dependency>
        <groupId>org.springdoc</groupId>
        <artifactId>springdoc-openapi-ui</artifactId>
        <version>${springdoc.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springdoc</groupId>
        <artifactId>springdoc-openapi-data-rest</artifactId>
        <version>${springdoc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger2</artifactId>
        <version>${springfox.version}</version>
      </dependency>
      <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-swagger-ui</artifactId>
        <version>${springfox.version}</version>
      </dependency>
      <dependency>
        <groupId>io.swagger.parser.v3</groupId>
        <artifactId>swagger-parser</artifactId>
        <version>${swagger.parser.version}</version>
      </dependency>
      <dependency>
        <groupId>io.springfox</groupId>
        <artifactId>springfox-bean-validators</artifactId>
        <version>${springfox.version}</version>
      </dependency>
      <!-- openapi tool -->
      <dependency>
        <groupId>org.openapitools</groupId>
        <artifactId>jackson-databind-nullable</artifactId>
        <version>${openapi.jackson.version}</version>
      </dependency>
      <!-- spotbugs annotation -->
      <dependency>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-annotations</artifactId>
        <version>${spotbugs.dependency.version}</version>
      </dependency>
      <!--
        graphql
      -->
      <!-- tools -->
      <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-java-tools</artifactId>
        <version>${graphql-tool.version}</version>
      </dependency>
      <!-- spring boot integration -->
      <dependency>
        <groupId>org.springframework.graphql</groupId>
        <artifactId>spring-graphql</artifactId>
        <version>${spring-graphql.version}</version>
      </dependency>
      <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-spring-boot-starter</artifactId>
        <version>${graphql-kickstart.version}</version>
      </dependency>
      <!-- UI -->
      <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>voyager-spring-boot-starter</artifactId>
        <version>${playground.version}</version>
      </dependency>
      <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>playground-spring-boot-starter</artifactId>
        <version>${playground.version}</version>
      </dependency>
      <!-- test -->
      <dependency>
        <groupId>com.graphql-java-kickstart</groupId>
        <artifactId>graphql-spring-boot-starter-test</artifactId>
        <version>${graphql-kickstart.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.github.kobylynskyi</groupId>
        <artifactId>graphql-java-codegen</artifactId>
        <version>${graphql-codegen.plugin.version}</version>
      </dependency>
      <!--
          test
      -->
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <version>${spring.boot.dependency.version}</version>
        <scope>test</scope>
        <!-- exclude junit 4 -->
        <exclusions>
          <exclusion>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <!-- faker -->
      <dependency>
        <groupId>com.github.javafaker</groupId>
        <artifactId>javafaker</artifactId>
        <version>${faker.version}</version>
        <scope>test</scope>
      </dependency>
      <!-- mockito -->
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.ninja-squad</groupId>
        <artifactId>springmockk</artifactId>
        <version>${springmockk.version}</version>
        <scope>test</scope>
      </dependency>
      <!--
          JEP
      -->
      <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>${javax.validation.version}</version>
      </dependency>
      <dependency>
        <groupId>com.vladmihalcea</groupId>
        <artifactId>hibernate-types-52</artifactId>
        <version>${vladmihalcea.version}</version>
      </dependency>
      <!-- geo -->
      <dependency>
        <groupId>org.geolatte</groupId>
        <artifactId>geolatte-geom</artifactId>
        <version>${geolatte-geom.version}</version>
      </dependency>
      <!--
          maven plugin development
      -->
      <dependency>
        <groupId>javax.inject</groupId>
        <artifactId>javax.inject</artifactId>
        <version>${javax.inject.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>${maven.plugin.development.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-compat</artifactId>
        <version>${maven.plugin.development.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-core</artifactId>
        <version>${maven.plugin.development.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${maven.plugin.development.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.plugin-tools</groupId>
        <artifactId>maven-plugin-annotations</artifactId>
        <version>${maven.plugin.plugin.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.maven.plugin-testing</groupId>
        <artifactId>maven-plugin-testing-harness</artifactId>
        <version>${testing-harness.version}</version>
        <scope>test</scope>
      </dependency>
      <!-- dagger -->
      <dependency>
        <groupId>com.google.dagger</groupId>
        <artifactId>dagger</artifactId>
        <version>${dagger.version}</version>
      </dependency>
      <!-- jwt -->
      <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt-api</artifactId>
        <version>${jsonwebtoken.version}</version>
      </dependency>
      <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt-impl</artifactId>
        <version>${jsonwebtoken.version}</version>
      </dependency>
      <dependency>
        <groupId>io.jsonwebtoken</groupId>
        <artifactId>jjwt-jackson</artifactId>
        <version>${jsonwebtoken.version}</version>
      </dependency>
      <!-- azure -->
      <dependency>
        <groupId>com.microsoft.azure.functions</groupId>
        <artifactId>azure-functions-java-library</artifactId>
        <version>${azure-function.version}</version>
      </dependency>
      <dependency>
        <groupId>com.azure</groupId>
        <artifactId>azure-messaging-eventhubs</artifactId>
        <version>${azure-messaging-eventhubs.version}</version>
      </dependency>
      <dependency>
        <groupId>com.azure</groupId>
        <artifactId>azure-core</artifactId>
        <version>${azure-core.version}</version>
      </dependency>
      <dependency>
        <groupId>com.azure</groupId>
        <artifactId>azure-identity</artifactId>
        <version>${azure-identity.version}</version>
      </dependency>

      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <!--
          initialization
        -->
        <!-- git commit id -->
        <plugin>
          <groupId>pl.project13.maven</groupId>
          <artifactId>git-commit-id-plugin</artifactId>
          <version>${git.commit.id.plugin.version}</version>
          <executions>
            <execution>
              <id>get-git-info</id>
              <goals>
                <goal>revision</goal>
              </goals>
              <phase>initialize</phase>
            </execution>
          </executions>
          <configuration>
            <failOnNoGitDirectory>false</failOnNoGitDirectory>
            <generateGitPropertiesFile>true</generateGitPropertiesFile>
            <verbose>false</verbose>
            <failOnNoGitDirectory>false</failOnNoGitDirectory>
            <generateGitPropertiesFilename>
              ${project.build.outputDirectory}/git.properties
            </generateGitPropertiesFilename>
            <gitDescribe>
              <skip>false</skip>
              <always>false</always>
              <dirty>-dirty</dirty>
            </gitDescribe>
          </configuration>
        </plugin>
        <!--
          validate
        -->
        <!-- document checker -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-docck-plugin</artifactId>
          <version>${docck.plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- lint -->
        <plugin>
          <groupId>com.github.ozsie</groupId>
          <artifactId>detekt-maven-plugin</artifactId>
          <version>${detekt.plugin.version}</version>
          <configuration>
            <autoCorrect>true</autoCorrect>
            <failBuildOnMaxIssuesReached>false</failBuildOnMaxIssuesReached>
          </configuration>
          <executions>
            <execution>
              <phase>verify</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- checkstyle -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${checkstyle.plugin.version}</version>
          <configuration>
            <configLocation>configuration/checkstyle/checkstyle.xml</configLocation>
            <suppressionsLocation>configuration/checkstyle/suppression.xml</suppressionsLocation>
            <excludes>${checkstyle.exclusion}</excludes>
            <inputEncoding>${project.build.sourceEncoding}</inputEncoding>
            <consoleOutput>true</consoleOutput>
            <failsOnError>true</failsOnError>
            <failOnViolation>true</failOnViolation>
            <violationSeverity>info</violationSeverity>
            <linkXRef>false</linkXRef>
            <skip>false</skip>
          </configuration>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>${puppycrawl.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- findbugs -->
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>${findbugs.plugin.version}</version>
          <configuration>
            <skip>false</skip>
            <failOnError>true</failOnError>
            <effort>Max</effort>
            <threshold>Low</threshold>
            <xmlOutput>true</xmlOutput>
            <outputDirectory>${project.build.directory}/findbugs</outputDirectory>
            <excludeFilterFile>configuration/findbugs/exclude.xml</excludeFilterFile>
          </configuration>
          <executions>
            <execution>
              <phase>validate</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- commit linter -->
        <plugin>
          <groupId>ga.rugal.maven</groupId>
          <artifactId>commitlinter-maven-plugin</artifactId>
          <version>${commitlinter.plugin.version}</version>
        </plugin>
        <!-- spotbugs -->
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${spotbugs.plugin.version}</version>
          <configuration>
            <trace>false</trace>
            <skip>false</skip>
            <failOnError>true</failOnError>
            <effort>Max</effort>
            <threshold>Low</threshold>
            <xmlOutput>true</xmlOutput>
            <outputDirectory>${project.build.directory}/findbugs</outputDirectory>
            <excludeFilterFile>configuration/findbugs/exclude.xml</excludeFilterFile>
          </configuration>
          <executions>
            <execution>
              <phase>verify</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- PMD -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${pmd.plugin.version}</version>
          <configuration>
            <skip>false</skip>
            <failOnViolation>true</failOnViolation>
            <printFailingErrors>true</printFailingErrors>
            <linkXRef>false</linkXRef>
            <analysisCache>false</analysisCache>
            <analysisCacheLocation>${project.build.directory}/pmd.cache</analysisCacheLocation>
            <excludes>
              <exclude>**/generated/**/*.java</exclude>
            </excludes>
            <excludeRoots>
              <excludeRoot>target/generated-sources</excludeRoot>
            </excludeRoots>
          </configuration>
          <executions>
            <execution>
              <phase>verify</phase>
              <goals>
                <goal>check</goal>
                <goal>pmd</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!--
          generate-sources
        -->
        <!-- build helper maven -->
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${build.helper.plugin.version}</version>
          <executions>
            <execution>
              <id>add_sources</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>add-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>src/main/java</source>
                </sources>
              </configuration>
            </execution>
            <execution>
              <id>add_test_sources</id>
              <phase>generate-test-sources</phase>
              <goals>
                <goal>add-test-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>src/test/java</source>
                </sources>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <!-- sisu index -->
        <plugin>
          <groupId>org.eclipse.sisu</groupId>
          <artifactId>sisu-maven-plugin</artifactId>
          <version>${sisu.plugin.version}</version>
          <!--http://maven.apache.org/maven-jsr330.html-->
          <executions>
            <execution>
              <id>generate-index</id>
              <goals>
                <goal>main-index</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- graphql codegen -->
        <plugin>
          <groupId>io.github.kobylynskyi</groupId>
          <artifactId>graphql-codegen-maven-plugin</artifactId>
          <version>${graphql-codegen.plugin.version}</version>
        </plugin>
        <!-- openapi codegen -->
        <!--https://openapi-generator.tech/docs/generators.html-->
        <plugin>
          <groupId>org.openapitools</groupId>
          <artifactId>openapi-generator-maven-plugin</artifactId>
          <version>${openapi.plugin.version}</version>
          <configuration>
            <configOptions>
              <dateLibrary>java8</dateLibrary>
              <interfaceOnly>true</interfaceOnly>
              <skipDefaultInterface>true</skipDefaultInterface>
            </configOptions>
            <enablePostProcessFile>false</enablePostProcessFile>
            <generateApis>true</generateApis>
            <generateApiDocumentation>false</generateApiDocumentation>
            <generateApiTests>false</generateApiTests>
            <generateModelDocumentation>false</generateModelDocumentation>
            <generateModelTests>false</generateModelTests>
            <generateSupportingFiles>false</generateSupportingFiles>
            <inputSpec>${project.basedir}/configuration/openapi/contract.yml</inputSpec>
            <modelNameSuffix>Dto</modelNameSuffix>
            <skipIfSpecIsUnchanged>${openapi.codegen.skipIfSpecIsUnchanged}</skipIfSpecIsUnchanged>
            <skip>true</skip>
          </configuration>
          <executions>
            <execution>
              <id>openapi-codegen-server</id>
              <goals>
                <goal>generate</goal>
              </goals>
              <configuration>
                <apiPackage>${openapi.codegen.api.package}</apiPackage>
                <configOptions>
                  <library>spring-boot</library>
                </configOptions>
                <invokerPackage>${openapi.codegen.invoker.package}</invokerPackage>
                <generatorName>spring</generatorName>
                <modelPackage>${openapi.codegen.model.package}</modelPackage>
              </configuration>
            </execution>
            <execution>
              <id>openapi-codegen-client</id>
              <goals>
                <goal>generate</goal>
              </goals>
              <configuration>
                <apiPackage>${openapi.codegen.package.root}.client.api</apiPackage>
                <configOptions>
                  <library>resttemplate</library>
                </configOptions>
                <invokerPackage>${openapi.codegen.package.root}.client.invoker</invokerPackage>
                <generatorName>java</generatorName>
                <modelPackage>${openapi.codegen.package.root}.client.model</modelPackage>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <!--
          compile
        -->
        <!-- kotlin compiler -->
        <plugin>
          <groupId>org.jetbrains.kotlin</groupId>
          <artifactId>kotlin-maven-plugin</artifactId>
          <version>${kotlin.version}</version>
          <executions>
            <execution>
              <id>compile</id>
              <phase>compile</phase>
              <goals>
                <goal>compile</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- java compiler -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${compiler.plugin.version}</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
            <!--to enable different java build version-->
            <fork>true</fork>
            <annotationProcessorPaths>
              <path>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${lombok.version}</version>
              </path>
              <path>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-processor</artifactId>
                <version>${mapstruct.version}</version>
              </path>
              <path>
                <groupId>com.google.dagger</groupId>
                <artifactId>dagger-compiler</artifactId>
                <version>${dagger.version}</version>
              </path>
            </annotationProcessorPaths>
            <compilerArgs>
              <compilerArg>
                -Amapstruct.defaultComponentModel=spring
              </compilerArg>
            </compilerArgs>
          </configuration>
        </plugin>
        <!--
            Test
        -->
        <!-- unit test -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${test.plugin.version}</version>
          <configuration>
            <argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true ${jacoco.surefire.arg}</argLine>
            <excludes>
              <exclude>**/*IntegrationTest.java</exclude>
            </excludes>
            <parallel>classes</parallel>
            <reportsDirectory>${surefire.report.path}</reportsDirectory>
            <skipTests>${skip.surefire.tests}</skipTests>
            <trimStackTrace>false</trimStackTrace>
            <useUnlimitedThreads>true</useUnlimitedThreads>
          </configuration>
        </plugin>
        <!--
          verify
        -->
        <!-- integration test -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${test.plugin.version}</version>
          <configuration>
            <argLine>-Djdk.net.URLClassPath.disableClassPathURLCheck=true ${jacoco.failsafe.arg}</argLine>
            <includes>
              <include>**/*IntegrationTest.java</include>
            </includes>
            <parallel>classes</parallel>
            <reportsDirectory>${failsafe.report.path}</reportsDirectory>
            <skipTests>${skip.failsafe.tests}</skipTests>
            <trimStackTrace>false</trimStackTrace>
            <useUnlimitedThreads>true</useUnlimitedThreads>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- test coverage -->
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.plugin.version}</version>
          <!-- exclude from jacoco coverage -->
          <configuration>
            <excludes>
              <exclude>**/exception/*</exclude>
              <exclude>**/entity/*</exclude>
              <exclude>**/swagger/**</exclude>
              <exclude>**/openapi/**</exclude>
              <exclude>**/mapper/**</exclude>
              <exclude>**/config/**</exclude>
              <exclude>**/generated-sources/**</exclude>
            </excludes>
            <rules>
              <rule>
                <element>CLASS</element>
                <limits>
                  <limit>
                    <counter>LINE</counter>
                    <value>COVEREDRATIO</value>
                    <minimum>${branch.threshold}</minimum>
                  </limit>
                  <limit>
                    <counter>BRANCH</counter>
                    <value>COVEREDRATIO</value>
                    <minimum>${line.threshold}</minimum>
                  </limit>
                </limits>
              </rule>
            </rules>
          </configuration>
          <executions>
            <!-- surefire report -->
            <execution>
              <id>prepare-surefire-agent</id>
              <phase>process-test-classes</phase>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
              <configuration>
                <propertyName>jacoco.surefire.arg</propertyName>
                <destFile>${surefire.agent.path}</destFile>
                <append>true</append>
                <skip>${skip.surefire.tests}</skip>
              </configuration>
            </execution>
            <execution>
              <id>post-unit-test</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
              <configuration>
                <dataFile>${surefire.agent.path}</dataFile>
                <outputDirectory>${jacoco.surefire.report.path}</outputDirectory>
                <skip>${skip.surefire.tests}</skip>
              </configuration>
            </execution>
            <!-- failsafe report -->
            <execution>
              <id>prepare-it-agent</id>
              <phase>pre-integration-test</phase>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
              <configuration>
                <destFile>${failsafe.agent.path}</destFile>
                <propertyName>jacoco.failsafe.arg</propertyName>
                <append>true</append>
                <skip>${skip.failsafe.tests}</skip>
              </configuration>
            </execution>
            <execution>
              <id>post-integration-test</id>
              <phase>post-integration-test</phase>
              <goals>
                <goal>report</goal>
              </goals>
              <configuration>
                <dataFile>${failsafe.agent.path}</dataFile>
                <outputDirectory>${jacoco.failsafe.report.path}</outputDirectory>
                <skip>${skip.failsafe.tests}</skip>
              </configuration>
            </execution>
            <!-- overall report -->
            <execution>
              <id>merge-results</id>
              <phase>verify</phase>
              <goals>
                <goal>merge</goal>
              </goals>
              <configuration>
                <fileSets>
                  <fileSet>
                    <directory>${surefire.report.path}</directory>
                    <includes>
                      <include>*.exec</include>
                    </includes>
                  </fileSet>
                  <fileSet>
                    <directory>${failsafe.report.path}</directory>
                    <includes>
                      <include>*.exec</include>
                    </includes>
                  </fileSet>
                </fileSets>
                <destFile>${overall.agent.path}</destFile>
              </configuration>
            </execution>
            <execution>
              <id>post-merge-report</id>
              <phase>verify</phase>
              <goals>
                <goal>report</goal>
              </goals>
              <configuration>
                <dataFile>${overall.agent.path}</dataFile>
                <outputDirectory>${jacoco.overall.report.path}</outputDirectory>
              </configuration>
            </execution>
            <!-- fail build if rule not reach -->
            <execution>
              <id>jacoco-check</id>
              <configuration>
                <dataFile>${overall.agent.path}</dataFile>
                <skip>${jacoco.skip.coverage.check}</skip>
              </configuration>
              <phase>verify</phase>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- gpg -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${gpg.plugin.version}</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!--
          packaging
        -->
        <!-- spring boot -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${assembly.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>${spring.boot.dependency.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>repackage</goal>
              </goals>
              <configuration>
                <classifier>exec</classifier>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <!-- Azure -->
        <plugin>
          <groupId>com.microsoft.azure</groupId>
          <artifactId>azure-functions-maven-plugin</artifactId>
          <version>${azure-function.plugin.version}</version>
          <configuration>
            <!-- function app name -->
            <appName>${azure.function.name}</appName>
            <!-- function app resource group -->
            <resourceGroup>${azure.resourceGroup}</resourceGroup>
            <!-- function app service plan name -->
            <appServicePlanName>${azure.servicePlanName}</appServicePlanName>
            <!-- function app region-->
            <region>${azure.region}</region>
            <runtime>
              <!-- runtime os, could be windows, linux or docker-->
              <os>${azure.runtime.os}</os>
              <!-- for docker function, please set the following parameters -->
              <!-- <image>[hub-user/]repo-name[:tag]</image> -->
              <!-- <serverId></serverId> -->
              <!-- <registryUrl></registryUrl>  -->
            </runtime>
            <appSettings>
              <property>
                <name>FUNCTIONS_EXTENSION_VERSION</name>
                <value>~3</value>
              </property>
            </appSettings>
          </configuration>
          <executions>
            <execution>
              <id>package-functions</id>
              <goals>
                <goal>package</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- source -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${source.plugin.version}</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- jar -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${source.plugin.version}</version>
          <executions>
            <execution>
              <id>default-jar</id>
              <goals>
                <goal>jar</goal>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
          </configuration>
        </plugin>
        <!-- documentation -->
        <plugin>
          <groupId>org.jetbrains.dokka</groupId>
          <artifactId>dokka-maven-plugin</artifactId>
          <version>${dokka.plugin.version}</version>
          <executions>
            <execution>
              <phase>pre-site</phase>
              <goals>
                <goal>dokka</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- javadoc -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${source.plugin.version}</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!--
          site
        -->
        <!-- release -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${release.plugin.version}</version>
          <configuration>
            <tagNameFormat>v@{project.version}</tagNameFormat>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <useReleaseProfile>false</useReleaseProfile>
            <releaseProfiles>release</releaseProfiles>
            <goals>deploy</goals>
          </configuration>
        </plugin>
        <!--
          deploy
        -->
        <!-- deploy -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${deploy.plugin.version}</version>
        </plugin>
        <!-- nexus -->
        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${nexus.staging.plugin.version}</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>ossrh</serverId>
            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
            <autoReleaseAfterClose>false</autoReleaseAfterClose>
          </configuration>
        </plugin>
        <!--
          others
        -->
        <!-- flyway plugin -->
        <plugin>
          <groupId>org.flywaydb</groupId>
          <artifactId>flyway-maven-plugin</artifactId>
          <version>${flyway.version}</version>
          <configuration>
            <installedBy>Rugal Bernstein</installedBy>
            <configFiles>src/main/resources/database/local.properties</configFiles>
            <locations>filesystem:src/main/resources/database/migration</locations>
          </configuration>
        </plugin>
        <!-- plugin management -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${maven.plugin.plugin.version}</version>
          <configuration>
            <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
          </configuration>
          <executions>
            <execution>
              <id>mojo-descriptor</id>
              <phase>process-classes</phase>
              <goals>
                <goal>descriptor</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <!-- cross source reference -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jxr-plugin</artifactId>
          <version>${jxr.plugin.version}</version>
        </plugin>
        <!-- resources -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${source.plugin.version}</version>
          <executions>
            <execution>
              <id>copy-resources</id>
              <phase>package</phase>
              <goals>
                <goal>copy-resources</goal>
              </goals>
              <configuration>
                <overwrite>true</overwrite>
                <outputDirectory>${azure.stagingDirectory}</outputDirectory>
                <resources>
                  <resource>
                    <directory>${project.basedir}</directory>
                    <includes>
                      <include>host.json</include>
                      <include>local.settings.json</include>
                    </includes>
                  </resource>
                </resources>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <!-- dependency -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${dependency.plugin.version}</version>
          <executions>
            <execution>
              <id>copy-dependencies</id>
              <phase>prepare-package</phase>
              <goals>
                <goal>copy-dependencies</goal>
              </goals>
              <configuration>
                <outputDirectory>${azure.stagingDirectory}/lib</outputDirectory>
                <overWriteReleases>false</overWriteReleases>
                <overWriteSnapshots>false</overWriteSnapshots>
                <overWriteIfNewer>true</overWriteIfNewer>
                <includeScope>runtime</includeScope>
                <excludeArtifactIds>azure-functions-java-library</excludeArtifactIds>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <!-- build plan -->
        <plugin>
          <groupId>fr.jcgay.maven.plugins</groupId>
          <artifactId>buildplan-maven-plugin</artifactId>
          <version>${buildplan.plugin.version}</version>
        </plugin>
        <!--
          reporting
        -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${site.plugin.version}</version>
        </plugin>
        <!-- project info -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${project.info.plugin.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <!-- build plan -->
      <plugin>
        <groupId>fr.jcgay.maven.plugins</groupId>
        <artifactId>buildplan-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <!--only activate for releasing to sonatype-->
    <profile>
      <id>sonatype</id>
      <build>
        <plugins>
          <!-- gpg -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>${sonatype.snapshot}</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>${sonatype.staging}</url>
    </repository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>ossrh</id>
      <name>Sonatype snapshot repository</name>
      <url>${sonatype.snapshot}</url>
      <layout>default</layout>
      <releases>
        <enabled>false</enabled>
        <updatePolicy>always</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
      </releases>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
        <checksumPolicy>fail</checksumPolicy>
      </snapshots>
    </repository>
  </repositories>
</project>
