<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~ 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                              ~
  ~ <br>                                                                 ~
  ~   http://www.apache.org/licenses/LICENSE-2.0                         ~
  ~ <br>                                                                 ~
  ~ 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 parent POM</name>
  <description>Reactive API backend Framework, built on top of Quarkus, for quick and easy REST API development</description>
  <url>https://github.com/vincejv/fpi-framework</url>
  <inceptionYear>2022</inceptionYear>

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.abavilla</groupId>
  <artifactId>fpi-framework-parent</artifactId>
  <version>1.8.2</version> <!-- version will be autogenerated through Git SHA -->
  <packaging>pom</packaging>

  <modules>
    <module>bom</module>
    <module>core</module>
    <module>pom</module>
  </modules>

  <properties>
    <!-- sonar properties -->
    <sonar.organization>vincejv</sonar.organization>
    <sonar.host.url>https://sonarcloud.io</sonar.host.url>

    <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
    <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
    <maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
    <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>

    <!-- repository settings for deployment -->
    <maven.deploy.nexus.repository-id>ossrh</maven.deploy.nexus.repository-id>
    <maven.deploy.nexus.base-url>https://s01.oss.sonatype.org/</maven.deploy.nexus.base-url>
    <maven.deploy.nexus.repository-url>${maven.deploy.nexus.base-url}service/local/staging/deploy/maven2</maven.deploy.nexus.repository-url>

    <!-- repository settings for snapshot release -->
    <maven.deploy.nexus.snapshot.repository-id>${maven.deploy.nexus.repository-id}</maven.deploy.nexus.snapshot.repository-id>
    <maven.deploy.nexus.snapshot.repository-url>${maven.deploy.nexus.base-url}content/repositories/snapshots</maven.deploy.nexus.snapshot.repository-url>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>${maven.deploy.nexus.snapshot.repository-id}</id>
      <url>${maven.deploy.nexus.snapshot.repository-url}</url>
    </snapshotRepository>
    <repository>
      <id>${maven.deploy.nexus.repository-id}</id>
      <url>${maven.deploy.nexus.repository-url}</url>
    </repository>
  </distributionManagement>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/vincejv/fpi-framework/issues</url>
  </issueManagement>

  <build>
    <plugins>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release-for-oss</id>
      <build>
        <plugins>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source-plugin.version}</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-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>${nexus-staging-maven-plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>${maven.deploy.nexus.repository-id}</serverId>
              <nexusUrl>${maven.deploy.nexus.base-url}</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
              <stagingProgressTimeoutMinutes>120</stagingProgressTimeoutMinutes>
            </configuration>
          </plugin>

        </plugins>
      </build>
    </profile>
    <profile>
      <id>allow-snapshots</id>
      <repositories>
        <repository>
          <id>${maven.deploy.nexus.snapshot.repository-id}</id>
          <url>${maven.deploy.nexus.snapshot.repository-url}</url>
          <releases><enabled>false</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>

</project>