<!--
  ~ This file is part of LotterySix.
  ~
  ~ Copyright (C) 2025. LoohpJames <jamesloohp@gmail.com>
  ~ Copyright (C) 2025. Contributors
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program. If not, see <https://www.gnu.org/licenses/>.
  -->

<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>com.loohp</groupId>
    <artifactId>LotterySix</artifactId>
    <name>LotterySix</name>
    <version>2026.1.1.0</version>

    <description>Lottery game in Minecraft inspired by the game 'Mark Six' by the HKJC</description>
    <url>https://github.com/LOOHP/LotterySix/</url>
    <packaging>jar</packaging>

    <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>
        <project.build.number></project.build.number>
        <project.fullVersion>${project.version}</project.fullVersion>
    </properties>

    <build>
        <defaultGoal>clean install</defaultGoal>
        <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>src/test/java</testSourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.6.2</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <shadedArtifactAttached>false</shadedArtifactAttached>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <relocations>
                                <relocation>
                                    <pattern>com.loohp.platformscheduler</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.com.loohp.platformscheduler</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>de.themoep.inventorygui</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.de.themoep.inventorygui</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.cryptomorin.xseries</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.com.cryptomorin.xseries</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.simpleyaml</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.org.simpleyaml</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.yaml.snakeyaml</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.org.yaml.snakeyaml</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.cronutils</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.com.cronutils</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.sun.el</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.com.sun.el</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>xyz.upperlevel</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.xyz.upperlevel</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>xyz.tozymc</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.xyz.tozymc</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>org.paukov.combinatorics3</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.org.paukov.combinatorics3</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>net.wesjd.anvilgui</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.net.wesjd.anvilgui</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>com.google.gson</pattern>
                                    <shadedPattern>com.loohp.lotterysix.libs.com.google.gson</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>com.loohp.interactivechat.main.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <encoding>ISO-8859-1</encoding>
                    <doctitle>LotterySix JavaDocs</doctitle>
                    <windowtitle>LotterySix JavaDocs</windowtitle>
                    <additionalOptions>
                        <additionalOption>-Xdoclint:none</additionalOption>
                    </additionalOptions>
                </configuration>
                <executions>
                    <execution>
                        <phase>install</phase>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>jenkins</id>
            <activation>
                <property>
                    <name>env.BUILD_NUMBER</name>
                </property>
            </activation>
            <properties>
                <project.build.number>-b${env.BUILD_NUMBER}</project.build.number>
                <!--<project.fullVersion>${project.version}${project.build.number}</project.fullVersion> -->
                <project.fullVersion>${project.version}</project.fullVersion>
            </properties>
        </profile>

        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <project.fullVersion>${project.version}</project.fullVersion>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <configuration>
                            <encoding>${project.build.sourceEncoding}</encoding>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.2.0</version>
                        <configuration>
                            <encoding>${project.build.sourceEncoding}</encoding>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>placeholderapi</id>
            <url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
        </repository>
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>papermc</id>
            <url>https://repo.papermc.io/repository/maven-public/</url>
        </repository>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
        <repository>
            <id>sonatype-oss-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>Scarsz-Nexus</id>
            <url>https://nexus.scarsz.me/content/groups/public/</url>
        </repository>
        <repository>
            <id>CodeMC</id>
            <url>https://repo.codemc.org/repository/maven-public/</url>
        </repository>
        <repository>
            <id>codemc-snapshots</id>
            <url>https://repo.codemc.io/repository/maven-snapshots/</url>
        </repository>
        <repository>
            <id>opencollab-snapshot-repo</id>
            <url>https://repo.opencollab.dev/main/</url>
        </repository>
        <repository>
            <id>minebench-repo</id>
            <url>https://repo.minebench.de/</url>
        </repository>
        <repository>
            <id>bungeecord-repo</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
        <repository>
            <id>mvn-wesjd-net</id>
            <url>https://mvn.wesjd.net/</url>
        </repository>
        <repository>
            <id>loohp-repo</id>
            <url>https://repo.loohpjames.com/repository</url>
        </repository>
    </repositories>

    <dependencies>
        <dependency>
            <groupId>com.loohp</groupId>
            <artifactId>PlatformScheduler</artifactId>
            <version>1.0.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.10</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>net.wesjd</groupId>
            <artifactId>anvilgui</artifactId>
            <version>1.10.12-SNAPSHOT</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.github.dpaukov</groupId>
            <artifactId>combinatoricslib3</artifactId>
            <version>3.4.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>de.themoep</groupId>
            <artifactId>inventorygui</artifactId>
            <version>1.6.5-SNAPSHOT</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>me.carleslc.Simple-YAML</groupId>
            <artifactId>Simple-Yaml</artifactId>
            <version>1.8.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>io.github.almighty-satan</groupId>
            <artifactId>XSeries</artifactId>
            <version>13.6.0+26.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>me.clip</groupId>
            <artifactId>placeholderapi</artifactId>
            <version>2.11.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.md-5</groupId>
            <artifactId>bungeecord-api</artifactId>
            <version>1.20-R0.1-SNAPSHOT</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.md-5</groupId>
            <artifactId>bungeecord-api</artifactId>
            <version>1.20-R0.1-SNAPSHOT</version>
            <type>javadoc</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.velocitypowered</groupId>
            <artifactId>velocity-api</artifactId>
            <version>3.4.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.20.6-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.bukkit</groupId>
            <artifactId>craftbukkit</artifactId>
            <version>1.20.6-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>xyz.upperlevel.spigot.book</groupId>
            <artifactId>spigot-book-api</artifactId>
            <version>1.6</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>xyz.tozymc.spigot</groupId>
            <artifactId>title-api</artifactId>
            <version>1.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>net.milkbowl.vault</groupId>
            <artifactId>VaultAPI</artifactId>
            <version>1.7</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.discordsrv</groupId>
            <artifactId>discordsrv</artifactId>
            <version>1.28.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.cronutils</groupId>
            <artifactId>cron-utils</artifactId>
            <version>9.2.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.geysermc.floodgate</groupId>
            <artifactId>api</artifactId>
            <version>2.2.4-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
</project>
