<?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>me.SuperRonanCraft</groupId>
    <artifactId>BetterRTPAddons</artifactId>
    <packaging>jar</packaging>
    <version>1.8.8</version>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <plugins>
            <plugin>
                <!-- Shade PaperLib into project -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation>
                    <relocations>
                        <relocation>
                            <pattern>io.papermc.lib</pattern>
                            <shadedPattern>me.SuperRonanCraft.BetterRTPAddons.paperlib</shadedPattern>
                        </relocation>
                    </relocations>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- Local Server Building -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <outputDirectory>../../../Java/plugins</outputDirectory>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <!-- PaperMC Repo -->
        <repository>
            <id>papermc</id>
            <url>https://papermc.io/repo/repository/maven-public/</url>
        </repository>
        <!-- ProtocolLib Repo -->
        <repository>
            <id>dmulloy2-repo</id>
            <url>https://repo.dmulloy2.net/nexus/repository/public/</url>
        </repository>
    </repositories>
    <dependencies>
        <!--Spigot API-->
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.13.2-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <!-- Spigot Stuff -->
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.8.8-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <!-- Paper Library for Async Chunk/Teleport -->
        <dependency>
            <groupId>io.papermc</groupId>
            <artifactId>paperlib</artifactId>
            <version>1.0.5</version>
            <scope>compile</scope>
        </dependency>
        <!-- BetterRTP -->
        <dependency>
            <groupId>me.SuperRonanCraft</groupId>
            <artifactId>BetterRTP</artifactId>
            <version>LATEST</version>
            <scope>provided</scope>
        </dependency>
        <!-- ProtocolLib -->
        <dependency>
            <groupId>com.comphenix.protocol</groupId>
            <artifactId>ProtocolLib</artifactId>
            <version>4.5.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.22</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>19.0.0</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>
</project>