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

  <groupId>com.heavenark.infrastructure</groupId>
  <artifactId>ark-base</artifactId>
  <version>3.0.0</version>

  <!-- Meta Data -->
  <name>ark-base</name>
  <description>Heaven Ark Infrastructure Tool Base</description>
  <url>https://gitlab.heavenark.com/heaven-ark-infrastructure/ark-infrastructure-base</url>

  <!-- Licenses -->
  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://www.opensource.org/licenses/mit-license.php</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <!-- SCM info -->
  <scm>
    <url>https://gitlab.heavenark.com/heaven-ark-infrastructure/ark-infrastructure-base</url>
    <developerConnection>
      https://gitlab.heavenark.com/heaven-ark-infrastructure/ark-infrastructure-base.git
    </developerConnection>
    <tag>master</tag>
  </scm>

  <!-- Developer Info -->
  <developers>
    <developer>
      <name>Luminous(BGLuminous)</name>
      <email>luminous@heavenark.com</email>
      <organization>Heaven Ark</organization>
      <timezone>UTC/GMT+08:00</timezone>
    </developer>
  </developers>

  <!-- Properties -->
  <properties>
    <maven.compiler.source>8</maven.compiler.source>
    <maven.compiler.target>8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <argLine>-Dfile.encoding=UTF-8</argLine>

    <!-- !!! dependency version control !!! -->
    <!-- https://mvnrepository.com/artifact/org.yaml/snakeyaml -->
    <dep.version.snakeyaml>1.30</dep.version.snakeyaml>
    <!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
    <dep.version.jackson>2.13.2.1</dep.version.jackson>
    <!-- https://mvnrepository.com/artifact/com.moandjiezana.toml/toml4j -->
    <dep.version.toml4j>0.7.2</dep.version.toml4j>

    <!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
    <dep.version.lombok>1.18.22</dep.version.lombok>
    <!-- https://mvnrepository.com/artifact/org.jetbrains/annotations -->
    <dep.version.annotations>23.0.0</dep.version.annotations>
    <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
    <dep.version.junit>5.8.2</dep.version.junit>

    <!-- !!! plugin version control !!! -->
    <!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
    <plug.version.nexus>1.6.12</plug.version.nexus>
    <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
    <plug.version.javadoc>3.3.2</plug.version.javadoc>
    <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
    <plug.version.source>3.2.1</plug.version.source>
    <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
    <plug.version.gpg>3.0.1</plug.version.gpg>
    <!-- https://mvnrepository.com/artifact/org.jacoco/jacoco-maven-plugin -->
    <plug.version.jacoco>0.8.7</plug.version.jacoco>
    <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
    <plug.version.surefire>2.22.2</plug.version.surefire>
  </properties>

  <!-- Deploy Server Config -->
  <distributionManagement>
    <repository>
      <id>jipa</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>ark-nexus</id>
      <name>ark-nexus</name>
      <url>https://nexus.heavenark.com/repository/maven-snapshot/</url>
    </snapshotRepository>
  </distributionManagement>

  <dependencies>
    <!-- !!! optional and provider !!! -->
    <dependency>
      <groupId>org.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
      <version>${dep.version.snakeyaml}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${dep.version.jackson}</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.moandjiezana.toml</groupId>
      <artifactId>toml4j</artifactId>
      <version>${dep.version.toml4j}</version>
      <optional>true</optional>
    </dependency>

    <!-- !!! development provided !!! -->
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${dep.version.lombok}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains</groupId>
      <artifactId>annotations</artifactId>
      <version>${dep.version.annotations}</version>
      <scope>provided</scope>
    </dependency>

    <!-- !!! Test !!! -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${dep.version.junit}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>${plug.version.nexus}</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>jipa</serverId>
          <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${plug.version.javadoc}</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
          <execution>
            <id>attach-javadocs</id>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${plug.version.source}</version>
        <configuration>
          <attach>true</attach>
        </configuration>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>${plug.version.gpg}</version>
        <executions>
          <execution>
            <id>jipa</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!-- https://mvnrepository.com/artifact/org.jacoco/jacoco-maven-plugin -->
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${plug.version.jacoco}</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
          <execution>
            <id>post-test</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${plug.version.surefire}</version>
      </plugin>
    </plugins>
  </build>

</project>