<?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.jasperchasetoq</groupId>
    <artifactId>CompressionCraft</artifactId>

    <version>UNOFFICIAL</version>

    <properties>
    <!-- UTF-8 is our standard encoding for source files -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- Target Java 16 -->
        <maven.compiler.source>16</maven.compiler.source>
        <maven.compiler.target>16</maven.compiler.target>
    </properties>

    <repositories>
        <repository>
            <id>paper-repo</id>
            <url>https://repo.destroystokyo.com/repository/maven-public/</url>
        </repository>

        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>

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

    <build>
        <finalName>${project.name} v${project.version}</finalName>
        <defaultGoal>clean package</defaultGoal>
        <sourceDirectory>${basedir}/src/main/java</sourceDirectory>

        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>*</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>16</source>
                    <target>16</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.3.0</version>
                <configuration>
                    <minimizeJar>true</minimizeJar>
                    <relocations>
                        <relocation>
                            <pattern>io.github.mooy1.infinitylib</pattern>
                            <shadedPattern>me.jasperchasetoq.compressioncraft.infinitylib</shadedPattern>
                        </relocation>
                    </relocations>

                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>META-INF/*</exclude>
                            </excludes>
                        </filter>
                    </filters>

                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

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

        <dependency>
            <groupId>com.github.Slimefun</groupId>
            <artifactId>Slimefun4</artifactId>
            <version>RC-32</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>io.github.baked-libs</groupId>
                    <artifactId>dough-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>3.0.2</version>
        </dependency>
        <dependency>
            <groupId>com.github.SlimefunGuguProject</groupId>
            <artifactId>InfinityLib</artifactId>
            <version>1.3.10</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>net.guizhanss</groupId>
            <artifactId>GuizhanLibPlugin</artifactId>
            <version>1.2.2</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
