<?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>de.viper</groupId>
    <artifactId>SurvivalPlus</artifactId>
    <version>1.1.1-Beta</version>
    <packaging>jar</packaging>
    <name>SurvivalPlus</name>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

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

    <dependencies>
        <!-- Spigot API -->
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.21-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

        <!-- bStats Bukkit Dependency -->
        <dependency>
            <groupId>org.bstats</groupId>
            <artifactId>bstats-bukkit</artifactId>
            <version>3.0.2</version>
            <scope>compile</scope>
        </dependency>

        <!-- PlaceholderAPI Dependency -->
        <dependency>
            <groupId>me.clip</groupId>
            <artifactId>placeholderapi</artifactId>
            <version>2.11.6</version>
            <scope>provided</scope>
        </dependency>

        <!-- LuckPerms API Dependency -->
        <dependency>
            <groupId>net.luckperms</groupId>
            <artifactId>luckperms-api</artifactId>
            <version>5.5.10</version>
            <scope>provided</scope>
        </dependency>

        <!-- ProtocolLib 4.8.0 (für WrapperPlayServerScoreboardTeam) -->
        <dependency>
            <groupId>com.comphenix.protocol</groupId>
            <artifactId>ProtocolLib</artifactId>
            <version>4.8.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- Compiler Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                </configuration>
            </plugin>

            <!-- Shade Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.4.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <relocations>
                                <relocation>
                                    <pattern>org.bstats</pattern>
                                    <shadedPattern>de.viper.survivalplus.bstats</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>plugin.yml</include>
                    <include>lang.yml</include>
                    <include>config.yml</include>
                    <include>homes.yml</include>
                    <include>inventory.yml</include>
                    <include>help.yml</include>
                    <include>graves.yml</include>
                    <include>stats.yml</include>
                    <include>leashes.yml</include>
                    <include>shop.yml</include>
                    <include>warps.yml</include>
                    <include>tablist.yml</include>
                    <include>blockedcommands.yml</include>
                    <include>claims.yml</include>
                    <include>lootchests.yml</include>
                    <include>blocks.yml</include>
                    <include>nicknames.yml</include>
                </includes>
            </resource>
        </resources>
    </build>
</project>
