<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>bootstrap-parent</artifactId>
    <groupId>org.geysermc</groupId>
    <version>1.4.0-SNAPSHOT</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>bootstrap-spigot</artifactId>
  <build>
    <resources>
      <resource>
        <filtering>true</filtering>
        <directory>src/main/resources/</directory>
      </resource>
    </resources>
    <finalName>${outputName}-Spigot</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Main-Class>org.geysermc.platform.spigot.GeyserSpigotMain</Main-Class>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.1</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <relocations>
                <relocation>
                  <pattern>it.unimi.dsi.fastutil</pattern>
                  <shadedPattern>org.geysermc.platform.spigot.shaded.fastutil</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson</pattern>
                  <shadedPattern>org.geysermc.platform.spigot.shaded.jackson</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.reflections</pattern>
                  <shadedPattern>org.geysermc.platform.spigot.shaded.reflections</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.common</pattern>
                  <shadedPattern>org.geysermc.platform.spigot.shaded.google.common</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google.guava</pattern>
                  <shadedPattern>org.geysermc.platform.spigot.shaded.google.guava</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.dom4j</pattern>
                  <shadedPattern>org.geysermc.platform.spigot.shaded.dom4j</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>net.kyori</pattern>
                  <shadedPattern>org.geysermc.platform.spigot.shaded.kyori</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <artifactSet>
            <excludes>
              <exclude>com.google.code.gson:*</exclude>
              <exclude>org.yaml:*</exclude>
              <exclude>io.netty:netty-transport-native-epoll:*</exclude>
              <exclude>io.netty:netty-transport-native-unix-common:*</exclude>
              <exclude>io.netty:netty-transport-native-kqueue:*</exclude>
              <exclude>io.netty:netty-handler:*</exclude>
              <exclude>io.netty:netty-common:*</exclude>
              <exclude>io.netty:netty-buffer:*</exclude>
              <exclude>io.netty:netty-resolver:*</exclude>
              <exclude>io.netty:netty-transport:*</exclude>
              <exclude>io.netty:netty-codec:*</exclude>
              <exclude>io.netty:netty-codec-dns:*</exclude>
              <exclude>io.netty:netty-resolver-dns:*</exclude>
              <exclude>io.netty:netty-resolver-dns-native-macos:*</exclude>
            </excludes>
          </artifactSet>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <repositories>
    <repository>
      <id>viaversion-repo</id>
      <url>https://repo.viaversion.com</url>
    </repository>
  </repositories>
  <dependencies>
    <dependency>
      <groupId>org.spigotmc</groupId>
      <artifactId>spigot-api</artifactId>
      <version>1.15.2-R0.1-SNAPSHOT</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>commons-lang</artifactId>
          <groupId>commons-lang</groupId>
        </exclusion>
        <exclusion>
          <artifactId>bungeecord-chat</artifactId>
          <groupId>net.md-5</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.viaversion</groupId>
      <artifactId>viaversion</artifactId>
      <version>4.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>1.18.20</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>
</project>
