<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.github.LlmDl</groupId>
  <artifactId>Towny</artifactId>
  <version>0.97.5.0</version>
  <organization>
    <name>TownyAdvanced</name>
    <url>https://github.com/TownyAdvanced</url>
  </organization>
  <licenses>
    <license>
      <name>CC BY-NC-ND 3.0</name>
      <url>http://creativecommons.org/licenses/by-nc-nd/3.0/</url>
      <distribution>repo</distribution>
      <comments>Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported</comments>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:https://github.com/TownyAdvanced/Towny.git</connection>
    <developerConnection>scm:git:https://github.com/TownyAdvanced/Towny.git</developerConnection>
    <url>https://github.com/TownyAdvanced/Towny</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>github</id>
      <name>GitHub TownyAdvanced Apache Maven Packages</name>
      <url>https://maven.pkg.github.com/TownyAdvanced/Towny</url>
    </repository>
  </distributionManagement>
  <properties>
    <java.version>17</java.version>
    <project.bukkitAPIVersion>1.14</project.bukkitAPIVersion>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.spigotmc</groupId>
      <artifactId>spigot-api</artifactId>
      <version>1.17-R0.1-SNAPSHOT</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.tnemc</groupId>
      <artifactId>Reserve</artifactId>
      <version>0.1.5.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.tnemc</groupId>
      <artifactId>TheNewChat</artifactId>
      <version>1.5.1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.github.MilkBowl</groupId>
      <artifactId>VaultAPI</artifactId>
      <version>1.7</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.ess3</groupId>
      <artifactId>EssentialsX</artifactId>
      <version>2.18.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.github.ElgarL</groupId>
      <artifactId>groupmanager</artifactId>
      <version>2.9</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.citizensnpcs</groupId>
      <artifactId>citizensapi</artifactId>
      <version>2.0.28-SNAPSHOT</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.14.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>me.clip</groupId>
      <artifactId>placeholderapi</artifactId>
      <version>2.10.9</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains</groupId>
      <artifactId>annotations</artifactId>
      <version>22.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.luckperms</groupId>
      <artifactId>api</artifactId>
      <version>5.3</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.github.bsideup.jabel</groupId>
      <artifactId>jabel-javac-plugin</artifactId>
      <version>0.4.2</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <repositories>
    <repository>
      <id>spigot-repo</id>
      <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
    </repository>
    <repository>
      <id>papermc</id>
      <url>https://papermc.io/repo/repository/maven-public/</url>
    </repository>
    <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
    </repository>
    <repository>
      <id>tne-repo</id>
      <url>https://repo.codemc.io/repository/maven-public/</url>
    </repository>
    <repository>
      <id>ess-repo</id>
      <url>https://repo.essentialsx.net/releases/</url>
    </repository>
    <repository>
      <id>citizens-repo</id>
      <url>https://repo.citizensnpcs.co/</url>
    </repository>
    <repository>
      <id>placeholderapi</id>
      <url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
    </repository>
    <repository>
      <id>sonatype-oss-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
    <repository>
      <id>central</id>
      <url>https://repo1.maven.org/maven2</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>apache.snapshots</id>
      <url>https://repository.apache.org/snapshots/</url>
    </pluginRepository>
  </pluginRepositories>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <defaultGoal>clean package</defaultGoal>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.8.1</version>
        <configuration>
          <release>8</release>
          <source>${java.version}</source>
          <target>${java.version}</target>
          <compilerArgs>
            <arg>-Xplugin:jabel</arg>
          </compilerArgs>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.3.1</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <source>${java.version}</source>
          <doclint>all,-missing</doclint>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.3.1-SNAPSHOT</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
          <artifactSet>
            <includes>
              <include>net.kyori:adventure-platform-bukkit</include>
              <include>net.kyori:adventure-platform-api</include>
              <include>net.kyori:adventure-api</include>
              <include>net.kyori:adventure-text-serializer-craftbukkit</include>
              <include>net.kyori:adventure-platform-facet</include>
              <include>net.kyori:adventure-text-serializer-gson</include>
              <include>net.kyori:adventure-text-serializer-legacy</include>
              <include>net.kyori:adventure-key</include>
              <include>net.kyori:adventure-text-serializer-gson-legacy-impl</include>
              <include>net.kyori:adventure-text-serializer-bungeecord</include>
              <include>net.kyori:adventure-platform-viaversion</include>
              <include>net.kyori:adventure-nbt</include>
              <include>net.kyori:examination-api</include>
              <include>net.kyori:examination-string</include>
              <include>com.zaxxer:HikariCP</include>
              <include>io.papermc:paperlib</include>
              <include>org.apache.commons:commons-compress</include>
              <include>org.bstats:bstats-bukkit</include>
              <include>org.bstats:bstats-base</include>
              <include>org.json:json</include>
            </includes>
          </artifactSet>
          <relocations>
            <relocation>
              <pattern>io.papermc.lib</pattern>
              <shadedPattern>com.palmergames.paperlib</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.zaxxer.hikari</pattern>
              <shadedPattern>com.palmergames.hikaricp</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.commons.compress</pattern>
              <shadedPattern>com.palmergames.compress</shadedPattern>
            </relocation>
            <relocation>
              <pattern>net.kyori.adventure</pattern>
              <shadedPattern>com.palmergames.adventure</shadedPattern>
            </relocation>
            <relocation>
              <pattern>net.kyori.examination</pattern>
              <shadedPattern>com.palmergames.examination</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.bstats</pattern>
              <shadedPattern>com.palmergames.bukkit.metrics</shadedPattern>
            </relocation>
          </relocations>
          <filters>
            <filter>
              <artifact>*:*</artifact>
              <excludes>
                <exclude>META-INF/*.MF</exclude>
              </excludes>
            </filter>
            <filter>
              <artifact>net.kyori:*</artifact>
              <excludes>META-INF/versions/9/module-info.class</excludes>
            </filter>
          </filters>
          <minimizeJar>true</minimizeJar>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>no-apidoc</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.3.1</version>
            <executions>
              <execution>
                <phase>none</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>intellij-idea-only</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <release>${java.version}</release>
              <compilerArgs>
                <arg>--enable-preview</arg>
              </compilerArgs>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
