<?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>
  <parent>
    <groupId>com.github.TownyAdvanced.Towny</groupId>
    <artifactId>towny-parent</artifactId>
    <version>0.99.3.0</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <groupId>com.github.TownyAdvanced.Towny</groupId>
  <artifactId>towny</artifactId>
  <version>0.99.3.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>
  <properties>
    <project.bukkitAPIVersion>1.16</project.bukkitAPIVersion>
    <java.version>17</java.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.spigotmc</groupId>
      <artifactId>spigot-api</artifactId>
      <version>1.20.1-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.1</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>bukkit</artifactId>
          <groupId>org.bukkit</groupId>
        </exclusion>
      </exclusions>
    </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.20.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>me.clip</groupId>
      <artifactId>placeholderapi</artifactId>
      <version>2.11.3</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.jetbrains</groupId>
      <artifactId>annotations</artifactId>
      <version>24.0.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.luckperms</groupId>
      <artifactId>api</artifactId>
      <version>5.4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.github.bsideup.jabel</groupId>
      <artifactId>jabel-javac-plugin</artifactId>
      <version>1.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.9.3</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-jupiter-params</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-engine</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.9.3</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>opentest4j</artifactId>
          <groupId>org.opentest4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-platform-commons</artifactId>
          <groupId>org.junit.platform</groupId>
        </exclusion>
        <exclusion>
          <artifactId>apiguardian-api</artifactId>
          <groupId>org.apiguardian</groupId>
        </exclusion>
      </exclusions>
    </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://repo.papermc.io/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://s01.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>
    <pluginRepository>
      <id>jitpack</id>
      <url>https://jitpack.io</url>
    </pluginRepository>
  </pluginRepositories>
  <build>
    <defaultGoal>clean package</defaultGoal>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.11.0</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.5.0</version>
        <executions>
          <execution>
            <id>install</id>
            <phase>install</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
          <execution>
            <id>deploy</id>
            <phase>deploy</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <source>16</source>
          <doclint>all,-missing</doclint>
          <doctitle>Towny - ${project.version}</doctitle>
          <groups>
            <group>
              <title>Events</title>
              <packages>com.palmergames.bukkit.towny.event*</packages>
            </group>
            <group>
              <title>Objects</title>
              <packages>com.palmergames.bukkit.towny.object*</packages>
            </group>
            <group>
              <title>Tasks</title>
              <packages>com.palmergames.bukkit.towny.regen*:com.palmergames.bukkit.towny.tasks</packages>
            </group>
            <group>
              <title>Plugin</title>
              <packages>com.palmergames.bukkit.towny.command*:com.palmergames.bukkit.towny.listeners*:com.palmergames.bukkit.towny:com.palmergames.bukkit.config*:com.palmergames.bukkit.towny.db*</packages>
            </group>
            <group>
              <title>Player</title>
              <packages>com.palmergames.bukkit.towny.confirmations:com.palmergames.bukkit.towny.invites:com.palmergames.bukkit.towny.conversation:com.palmergames.bukkit.towny.huds</packages>
            </group>
            <group>
              <title>Hooks</title>
              <packages>com.palmergames.bukkit.towny.permissions:com.palmergames.bukkit.towny.hooks:com.palmergames.bukkit.towny.chat*</packages>
            </group>
            <group>
              <title>Exceptions</title>
              <packages>com.palmergames.bukkit.towny.exceptions*:com.palmergames.bukkit.towny.invites.exceptions</packages>
            </group>
            <group>
              <title>Utilities</title>
              <packages>com.palmergames.annotations:com.palmergames.util:com.palmergames.bukkit.util:com.palmergames.bukkit.towny.utils</packages>
            </group>
          </groups>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.3.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.5.0</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>net.kyori:adventure-text-serializer-plain</include>
              <include>net.kyori:adventure-text-minimessage</include>
              <include>com.zaxxer:HikariCP</include>
              <include>io.papermc:paperlib</include>
              <include>org.apache.commons:commons-compress</include>
              <include>org.apache.commons:commons-text</include>
              <include>org.bstats:bstats-bukkit</include>
              <include>org.bstats:bstats-base</include>
              <include>org.json:json</include>
              <include>solar.squares:pixel-width-core</include>
              <include>com.palmergames.bukkit.towny:towny-base-providers</include>
              <include>com.palmergames.bukkit.towny:towny-folia-provider</include>
              <include>com.palmergames.bukkit.towny:towny-paper-provider</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>org.apache.commons.text</pattern>
              <shadedPattern>com.palmergames.text</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>
            <relocation>
              <pattern>solar.squares.pixelwidth</pattern>
              <shadedPattern>com.palmergames.bukkit.towny.libs.pixelwidth</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>
      <plugin>
        <groupId>com.github.TownyAdvanced</groupId>
        <artifactId>bridger</artifactId>
        <version>1.7.1.Final</version>
        <executions>
          <execution>
            <id>weave</id>
            <phase>process-classes</phase>
            <goals>
              <goal>transform</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.1.2</version>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <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>
