<?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>xyz.tozymc.spigot</groupId>
  <artifactId>commands-api</artifactId>
  <version>2.0</version>
  <packaging>jar</packaging>
  <name>commands-api</name>

  <description>Command libraries for spigot plugin.</description>
  <url>https://github.com/TozyMC/CommandHandler</url>

  <distributionManagement>
    <repository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/TozyMC/commands-api/issues</url>
  </issueManagement>

  <inceptionYear>2020</inceptionYear>

  <scm>
    <connection>scm:git:https://github.com/TozyMC/commands-api.git</connection>
    <developerConnection>scm:git:https://github.com/TozyMC/commands-api.git</developerConnection>
    <url>https://github.com/TozyMC/commands-api/tree/${project.scm.tag}</url>
    <tag>main</tag>
  </scm>

  <developers>
    <developer>
      <id>tozymc</id>
      <name>TozyMC</name>
      <url>https://github.com/TozyMC</url>
      <roles>
        <role>Owner</role>
      </roles>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/TozyMC/commands-api/blob/main/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <properties>
    <java.version>1.8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0-M4</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedArtifactAttached>true</shadedArtifactAttached>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/MANIFEST.MF</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.1.1</version>
        <executions>
          <execution>
            <id>bundle-sources</id>
            <phase>package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <executions>
          <execution>
            <id>attach-javadoc</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
        <configuration>
          <charset>utf-8</charset>
          <source>${java.version}</source>
          <excludePackageNames>xyz.tozymc.spigot.api.command.handler</excludePackageNames>
          <links>
            <link>https://tozymc.github.io/javadocs/spigot/1.16/</link>
            <link>https://javadoc.io/doc/org.jetbrains/annotations-java5/20.1.0/</link>
          </links>
          <bottom>Copyright © {currentYear} TozyMC. All rights reserved.</bottom>
        </configuration>
      </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>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
  </build>

  <repositories>
    <repository>
      <id>spigotmc-repo</id>
      <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>org.spigotmc</groupId>
      <artifactId>spigot-api</artifactId>
      <version>1.16.3-R0.1-SNAPSHOT</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains</groupId>
      <artifactId>annotations-java5</artifactId>
      <version>20.1.0</version>
      <scope>provided</scope>
    </dependency>

    <!-- For testing -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.7.0-M1</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
