<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>com.illuzionzstudios</groupId>
    <artifactId>CustomFishing</artifactId>
    <version>5.0.0</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <kotlin.code.style>official</kotlin.code.style>
        <kotlin.compiler.jvmTarget>1.8</kotlin.compiler.jvmTarget>
        <kotlin.version>1.7.0</kotlin.version>
    </properties>

    <repositories>
        <repository>
            <id>nms-repo</id>
            <url>https://repo.codemc.org/repository/nms/</url>
        </repository>

        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>

        <repository>
            <id>sk89q-repo</id>
            <url>https://maven.enginehub.org/repo/</url>
        </repository>
    </repositories>

    <dependencies>
<!--        <dependency>-->
<!--            <groupId>com.github.IlluzionzDev</groupId>-->
<!--            <artifactId>Mist</artifactId>-->
<!--            <version>9d4b8f8549</version>-->
<!--        </dependency>-->
<!--        <dependency>-->
<!--            <groupId>com.illuzionzstudios</groupId>-->
<!--            <artifactId>mist</artifactId>-->
<!--            <version>1.0.4</version>-->
<!--            <scope>system</scope>-->
<!--            <systemPath>${project.basedir}/src/main/libs/Mist-1.0.4.jar</systemPath>-->
<!--        </dependency>-->
        <dependency>
            <groupId>com.illuzionzstudios</groupId>
            <artifactId>mist</artifactId>
            <version>1.0.4</version>
        </dependency>


        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot</artifactId>
            <version>1.20.4-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>${kotlin.version}</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/kotlin</sourceDirectory>
        <finalName>CustomFishing-${project.version}</finalName>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <relocations>
                        <relocation>
                            <pattern>com.illuzionzstudios.mist</pattern>
                            <shadedPattern>com.illuzionzstudios.customfishing.mist</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>kotlin</pattern>
                            <shadedPattern>com.illuzionzstudios.customfishing.kotlin</shadedPattern>
                        </relocation>
                    </relocations>
                    <createDependencyReducedPom>true</createDependencyReducedPom>
                    <shadedArtifactAttached>false</shadedArtifactAttached>
                    <minimizeJar>true</minimizeJar>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>1.8</jvmTarget>
                </configuration>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <filtering>true</filtering>
                <directory>${project.basedir}/src/main/resources/</directory>
            </resource>
        </resources>
    </build>

</project>