<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>hu.vzone</groupId>
    <artifactId>VSellWand</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>

    <name>VSellWand</name>
    <description>A feature rich sell wand plugin with a simple configuration.</description>

    <properties>
        <java.version>21</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <vault.version>1.7</vault.version>
        <playerpoints.version>3.3.4</playerpoints.version>
        <coinsengine.version>2.8.0</coinsengine.version>
        <axgens.version>14</axgens.version>
        <shopguiplus.version>3.2.0</shopguiplus.version>
        <economyshopgui.version>1.10.0</economyshopgui.version>
        <essentialsx.version>2.21.2</essentialsx.version>
        <cmi-api.version>9.8.6.4</cmi-api.version>
        <bentobox.version>2.7.0</bentobox.version>
        <lands-api.version>7.25.14</lands-api.version>
        <towny.version>0.103.0.0</towny.version>
        <worldguard.version>7.1.0-SNAPSHOT</worldguard.version>
        <iridiumskyblock.version>4.1.5-b2</iridiumskyblock.version>
        <husktowns.version>3.1.4</husktowns.version>
        <saberfactions.version>4.1.4-STABLE</saberfactions.version>
        <vcontainer.version>1.0.0</vcontainer.version>
        <placeholderapi.version>2.12.2</placeholderapi.version>
        <folialib.version>0.5.2</folialib.version>
        <kingdomsx.version>1.17.18.1-BETA</kingdomsx.version>
        <superiorskyblock-api.version>2026.1</superiorskyblock-api.version>
        <griefprevention.version>11.2</griefprevention.version>
        <plotsquared.version>7.5.13</plotsquared.version>
        <residence.version>4.9.1.8</residence.version>
        <itembuilder.version>1.0.0</itembuilder.version>
    </properties>

    <repositories>
        <repository>
            <id>papermc</id>
            <url>https://repo.papermc.io/repository/maven-public/</url>
        </repository>
        <repository>
            <id>central</id>
            <url>https://repo.maven.apache.org/maven2/</url>
        </repository>
        <repository>
            <id>jitpack</id>
            <url>https://jitpack.io</url>
        </repository>
        <repository>
            <id>rosewood-repo</id>
            <url>https://repo.rosewooddev.io/repository/public/</url>
        </repository>
        <repository>
            <id>nightexpress-releases</id>
            <url>https://repo.nightexpressdev.com/releases</url>
        </repository>
        <repository>
            <id>artillex-studios</id>
            <url>https://repo.artillex-studios.com/releases/</url>
        </repository>
        <repository>
            <id>codemc</id>
            <url>https://repo.codemc.org/repository/maven-public/</url>
        </repository>
        <repository>
            <id>incredibleplugins</id>
            <url>https://repo.incredibleplugins.com/releases</url>
        </repository>
        <repository>
            <id>towny</id>
            <url>https://repo.glaremasters.me/repository/towny/</url>
        </repository>
        <repository>
            <id>enginehub</id>
            <url>https://maven.enginehub.org/repo/</url>
        </repository>
        <repository>
            <id>iridiumdevelopment</id>
            <url>https://nexus.iridiumdevelopment.net/repository/maven-releases/</url>
        </repository>
        <repository>
            <id>william278</id>
            <url>https://repo.william278.net/releases</url>
        </repository>
        <repository>
            <id>essentials-releases</id>
            <url>https://repo.essentialsx.net/releases/</url>
        </repository>
        <repository>
            <id>extendedclip</id>
            <url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
        </repository>
        <repository>
            <id>vzone-repo</id>
            <url>https://repo.vzone.hu/releases</url>
        </repository>
        <repository>
            <id>tcoded-releases</id>
            <url>https://repo.tcoded.com/releases</url>
        </repository>
        <repository>
            <id>bg-software-api</id>
            <url>https://repo.bg-software.com/repository/api/</url>
        </repository>
        <repository>
            <id>elmakers</id>
            <url>https://maven.elmakers.com/repository/</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>io.papermc.paper</groupId>
            <artifactId>paper-api</artifactId>
            <version>1.21-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
            <version>3.2.4</version>
        </dependency>
        <dependency>
            <groupId>org.spongepowered</groupId>
            <artifactId>configurate-yaml</artifactId>
            <version>4.2.0</version>
        </dependency>
        <dependency>
            <groupId>net.kyori</groupId>
            <artifactId>adventure-text-minimessage</artifactId>
            <version>4.17.0</version>
        </dependency>
        <dependency>
            <groupId>net.kyori</groupId>
            <artifactId>adventure-text-serializer-legacy</artifactId>
            <version>4.17.0</version>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.38</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>hu.vzone</groupId>
            <artifactId>ItemBuilder</artifactId>
            <version>${itembuilder.version}</version>
        </dependency>

        <!-- Economy APIs -->
        <dependency>
            <groupId>com.github.MilkBowl</groupId>
            <artifactId>VaultAPI</artifactId>
            <version>${vault.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.black_ixx</groupId>
            <artifactId>playerpoints</artifactId>
            <version>${playerpoints.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>su.nightexpress.excellenteconomy</groupId>
            <artifactId>ExcellentEconomy</artifactId>
            <version>${coinsengine.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Price provider APIs -->
        <dependency>
            <groupId>com.artillexstudios</groupId>
            <artifactId>AxGensAPI</artifactId>
            <version>${axgens.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.brcdev-minecraft</groupId>
            <artifactId>shopgui-api</artifactId>
            <version>${shopguiplus.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.Gypopo</groupId>
            <artifactId>EconomyShopGUI-API</artifactId>
            <version>${economyshopgui.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.essentialsx</groupId>
            <artifactId>EssentialsX</artifactId>
            <version>${essentialsx.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.Zrips</groupId>
            <artifactId>CMI-API</artifactId>
            <version>${cmi-api.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Protection and container APIs -->
        <dependency>
            <groupId>world.bentobox</groupId>
            <artifactId>bentobox</artifactId>
            <version>${bentobox.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.incredibleplugins</groupId>
            <artifactId>lands-api</artifactId>
            <version>${lands-api.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.palmergames.bukkit.towny</groupId>
            <artifactId>towny</artifactId>
            <version>${towny.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sk89q.worldguard</groupId>
            <artifactId>worldguard-bukkit</artifactId>
            <version>${worldguard.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.cryptomorin</groupId>
            <artifactId>kingdoms</artifactId>
            <version>${kingdomsx.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.bgsoftware</groupId>
            <artifactId>SuperiorSkyblockAPI</artifactId>
            <version>${superiorskyblock-api.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>me.ryanhamshire</groupId>
            <artifactId>GriefPrevention</artifactId>
            <version>${griefprevention.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.iridium</groupId>
            <artifactId>IridiumSkyblock</artifactId>
            <version>${iridiumskyblock.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.william278.husktowns</groupId>
            <artifactId>husktowns-bukkit</artifactId>
            <version>${husktowns.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.SaberLLC</groupId>
            <artifactId>Saber-Factions</artifactId>
            <version>${saberfactions.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.intellectualsites.plotsquared</groupId>
            <artifactId>plotsquared-core</artifactId>
            <version>${plotsquared.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.intellectualsites.plotsquared</groupId>
            <artifactId>plotsquared-bukkit</artifactId>
            <version>${plotsquared.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.bekvon.bukkit</groupId>
            <artifactId>Residence</artifactId>
            <version>${residence.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>hu.vzone</groupId>
            <artifactId>VContainer</artifactId>
            <version>${vcontainer.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Other plugin APIs -->
        <dependency>
            <groupId>me.clip</groupId>
            <artifactId>placeholderapi</artifactId>
            <version>${placeholderapi.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.tcoded</groupId>
            <artifactId>FoliaLib</artifactId>
            <version>${folialib.version}</version>
            <scope>provided</scope>
        </dependency>



        <!--
            Kept reflective because the supplied dependency folder does not provide a resolvable API artifact/version:
            - RoyaleEconomy: supplied text explicitly says there is no Maven import.
            - ExcellentShop: documented artifact publishes only a POM for 5.1.1 in the NightExpress repository, no JAR.
        -->
    </dependencies>

    <build>
        <finalName>VSellWand-${project.version}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <release>${java.version}</release>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>1.18.38</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                            <relocations>
                                <relocation>
                                    <pattern>com.github.benmanes.caffeine</pattern>
                                    <shadedPattern>hu.vzone.vsellwand.libs.caffeine</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.spongepowered.configurate</pattern>
                                    <shadedPattern>hu.vzone.vsellwand.libs.configurate</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>hu.vzone.itembuilder</pattern>
                                    <shadedPattern>hu.vzone.vsellwand.libs.itembuilder</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
