<?xml version="1.0"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~ Copyright (C) 2022 Vince Jerald Villamora @ https://vincejv.com      ~
  ~                                                                      ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");      ~
  ~ you may not use this file except in compliance with the License.     ~
  ~ You may obtain a copy of the License at                              ~
  ~                                                                      ~
  ~   http://www.apache.org/licenses/LICENSE-2.0                         ~
  ~                                                                      ~
  ~ Unless required by applicable law or agreed to in writing, software  ~
  ~ distributed under the License is distributed on an "AS IS" BASIS,    ~
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or      ~
  ~ implied. See the License for the specific language governing         ~
  ~ permissions and limitations under the License.                       ~
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<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">
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>vincejv</id>
      <name>Vince Jerald Villamora</name>
      <email>vincevillamora@gmail.com</email>
      <timezone>+8</timezone>
      <organization>Abavilla</organization>
      <organizationUrl>https://github.com/vincejv</organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/vincejv/fpi-framework</url>
    <connection>scm:git:git://github.com/vincejv/fpi-framework.git</connection>
    <developerConnection>scm:git:git@github.com:vincejv/fpi-framework.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

  <name>FPI Framework BOM</name>
  <description>Reactive API backend Framework, built on top of Quarkus, for quick and easy REST API development - Bill of Materials</description>
  <url>https://github.com/vincejv/fpi-framework</url>
  <inceptionYear>2022</inceptionYear>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>fpi-framework-bom</artifactId>
  <packaging>pom</packaging>

  <parent>
    <groupId>com.abavilla</groupId>
    <artifactId>fpi-framework</artifactId>
    <version>1.1.33</version> <!-- version will be autogenerated through Git SHA -->
    <relativePath>../pom.xml</relativePath>
  </parent>

  <properties>
    <compiler-plugin.version>3.10.1</compiler-plugin.version>
    <maven.compiler.release>17</maven.compiler.release>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
    <quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
    <quarkus.platform.version>2.12.3.Final</quarkus.platform.version>
    <org.mapstruct.version>1.5.3.Final</org.mapstruct.version>
    <skipITs>true</skipITs>
    <surefire-plugin.version>3.0.0-M7</surefire-plugin.version>
    <lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
    <org.projectlombok.version>1.18.24</org.projectlombok.version>
    <json-jackson-databind.version>2.13.4.2</json-jackson-databind.version>
    <json-jackson-datatype-jsr310.version>2.13.4</json-jackson-datatype-jsr310.version>
    <apache.commons-lang3.version>3.12.0</apache.commons-lang3.version>
    <apache.commons-collections4.version>4.4</apache.commons-collections4.version>
    <jandex-maven-plugin.version>1.2.3</jandex-maven-plugin.version>
    <abavilla.framework.group-id>com.abavilla</abavilla.framework.group-id>
    <abavilla.framework.version>1.1.33</abavilla.framework.version> <!-- should be managed by versioning plugin -->
  </properties>

  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>${quarkus.platform.group-id}</groupId>
        <artifactId>${quarkus.platform.artifact-id}</artifactId>
        <version>${quarkus.platform.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${apache.commons-lang3.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>${apache.commons-collections4.version}</version>
      </dependency>

      <!-- Lombok -->
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${org.projectlombok.version}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${json-jackson-databind.version}</version>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>${json-jackson-datatype-jsr310.version}</version>
      </dependency>

      <dependency>
        <groupId>org.mapstruct</groupId>
        <artifactId>mapstruct</artifactId>
        <version>${org.mapstruct.version}</version>
      </dependency>

      <dependency>
        <groupId>${abavilla.framework.group-id}</groupId>
        <artifactId>fpi-framework-core</artifactId>
        <version>${abavilla.framework.version}</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <dependencies>

  </dependencies>

  <build>
    <pluginManagement>
      <plugins>

        <plugin>
          <groupId>${quarkus.platform.group-id}</groupId>
          <artifactId>quarkus-maven-plugin</artifactId>
          <version>${quarkus.platform.version}</version>
          <extensions>true</extensions>
          <executions>
            <execution>
              <goals>
                <goal>build</goal>
                <goal>generate-code</goal>
                <goal>generate-code-tests</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${compiler-plugin.version}</version>
          <configuration>
            <compilerArgs>
              <arg>-parameters</arg>
            </compilerArgs>
            <annotationProcessorPaths>
              <path>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>${org.projectlombok.version}</version>
              </path>
              <path>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok-mapstruct-binding</artifactId>
                <version>${lombok-mapstruct-binding.version}</version>
              </path>
              <path>
                <groupId>org.mapstruct</groupId>
                <artifactId>mapstruct-processor</artifactId>
                <version>${org.mapstruct.version}</version>
              </path>
            </annotationProcessorPaths>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.jboss.jandex</groupId>
          <artifactId>jandex-maven-plugin</artifactId>
          <version>${jandex-maven-plugin.version}</version>
          <executions>
            <execution>
              <id>make-index</id>
              <goals>
                <goal>jandex</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefire-plugin.version}</version>
          <configuration>
            <systemPropertyVariables>
              <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
              <maven.home>${maven.home}</maven.home>
            </systemPropertyVariables>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${surefire-plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
              <configuration>
                <systemPropertyVariables>
                  <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
                  <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                  <maven.home>${maven.home}</maven.home>
                </systemPropertyVariables>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <configuration>
            <descriptorRefs>
              <descriptorRef>jar-with-dependencies</descriptorRef>
            </descriptorRefs>
          </configuration>
          <executions>
            <execution>
              <id>make-assembly</id>
              <phase>package</phase>
              <goals>
                <goal>single</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

      </plugins>
    </pluginManagement>
  </build>

</project>
