<?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>

    <properties>
        <project.jdk.version>8</project.jdk.version>
        <maven.compiler.source>${project.jdk.version}</maven.compiler.source>
        <maven.compiler.target>${project.jdk.version}</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>

        <deps.easyplugin.version>1.5.12</deps.easyplugin.version>
        <deps.easysql.version>0.4.7</deps.easysql.version>
        <deps.mineconfig.version>3.1.1</deps.mineconfig.version>
    </properties>

    <groupId>cc.carm.plugin</groupId>
    <artifactId>moeteleport</artifactId>
    <version>4.0.3</version>

    <name>MoeTeleport</name>
    <description>喵喵传送，简单的传送、设置家的插件。</description>
    <url>https://github.com/CarmJos/MoeTeleport</url>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/CarmJos/MoeTeleport/issues</url>
    </issueManagement>

    <ciManagement>
        <system>GitHub Actions</system>
        <url>https://github.com/CarmJos/MoeTeleport/actions/workflows/maven.yml</url>
    </ciManagement>

    <developers>
        <developer>
            <id>CarmJos</id>
            <name>Carm Jos</name>
            <email>carm@carm.cc</email>
            <url>https://work.carm.cc</url>
        </developer>
    </developers>

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

        <repository>
            <id>placeholder-api-repo</id>
            <url>https://repo.extendedclip.com/content/repositories/placeholderapi/</url>
        </repository>

        <repository>
            <id>oss-repo</id>
            <url>https://oss.sonatype.org/content/groups/public/</url>
        </repository>

        <repository>
            <id>nexus</id>
            <url>https://mvn.lumine.io/repository/maven-public/</url>
        </repository>

        <repository>
            <id>maven-central</id>
            <url>https://repo1.maven.org/maven2/</url>
        </repository>

        <repository>
            <id>minebench-repo</id>
            <url>https://repo.minebench.de/</url>
        </repository>

        <repository>
            <id>essentials-repo</id>
            <url>https://repo.essentialsx.net/releases/</url>
        </repository>

        <repository>
            <id>carm-repo</id>
            <name>Carm's Repo</name>
            <url>https://repo.carm.cc/repository/maven-public/</url>
        </repository>

    </repositories>

    <distributionManagement>
        <downloadUrl>https://github.com/CarmJos/MoeTeleport/releases</downloadUrl>
        <repository>
            <id>github</id>
            <name>GitHub Packages</name>
            <url>https://maven.pkg.github.com/CarmJos/MoeTeleport</url>
        </repository>
    </distributionManagement>

    <dependencies>

        <dependency>
            <groupId>cc.carm.lib</groupId>
            <artifactId>mineconfiguration-bukkit</artifactId>
            <version>${deps.mineconfig.version}</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>cc.carm.lib</groupId>
            <artifactId>easyplugin-main</artifactId>
            <version>${deps.easyplugin.version}</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>cc.carm.lib</groupId>
            <artifactId>easyplugin-command</artifactId>
            <version>${deps.easyplugin.version}</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>cc.carm.lib</groupId>
            <artifactId>easyplugin-command-alias</artifactId>
            <version>${deps.easyplugin.version}</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>cc.carm.lib</groupId>
            <artifactId>easyplugin-githubchecker</artifactId>
            <version>${deps.easyplugin.version}</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>net.essentialsx</groupId>
            <artifactId>EssentialsX</artifactId>
            <version>2.21.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.Zrips</groupId>
            <artifactId>CMI-API</artifactId>
            <version>9.3.1.2</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/CMI-API9.3.1.2.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>com.Zrips</groupId>
            <artifactId>CMILib</artifactId>
            <version>1.2.4.5</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/CMILib1.2.4.5.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>cc.carm.lib</groupId>
            <artifactId>easysql-beecp</artifactId>
            <version>${deps.easysql.version}</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>de.themoep</groupId>
            <artifactId>minedown</artifactId>
            <version>1.7.1-SNAPSHOT</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>xyz.xenondevs</groupId>
            <artifactId>particle</artifactId>
            <version>1.8.4</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

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

        <dependency>
            <groupId>com.comphenix.protocol</groupId>
            <artifactId>ProtocolLib</artifactId>
            <version>5.3.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.bstats</groupId>
            <artifactId>bstats-bukkit</artifactId>
            <version>3.1.0</version>
            <scope>compile</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>me.clip</groupId>
            <artifactId>placeholderapi</artifactId>
            <version>2.11.6</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>26.0.2</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.5.0</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${project.basedir}/asset/</directory>
                            <useDefaultExcludes>true</useDefaultExcludes>
                            <includes>
                                <include>**/*</include>
                            </includes>
                        </fileset>
                        <fileset>
                            <directory>${project.basedir}/api-docs/</directory>
                            <useDefaultExcludes>true</useDefaultExcludes>
                            <includes>
                                <include>**/*</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.14.0</version>
                <configuration>
                    <source>${project.jdk.version}</source>
                    <target>${project.jdk.version}</target>
                    <encoding>UTF-8</encoding>
                    <compilerArgument>-parameters</compilerArgument>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.4.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.3.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </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>
                    </execution>
                </executions>
                <configuration>
                    <finalName>MoeTeleport-${project.version}</finalName>
                    <outputDirectory>${project.basedir}/asset/</outputDirectory>
                    <createDependencyReducedPom>false</createDependencyReducedPom>
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>META-INF/MANIFEST.MF</exclude>
                                <exclude>META-INF/*.txt</exclude>
                            </excludes>
                        </filter>
                    </filters>
                    <relocations>
                        <relocation>
                            <pattern>cc.carm.lib</pattern>
                            <shadedPattern>cc.carm.plugin.moeteleport.lib</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>de.themoep.minedown</pattern>
                            <shadedPattern>cc.carm.plugin.moeteleport.lib.minedown</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>org.bstats</pattern>
                            <shadedPattern>cc.carm.plugin.moeteleport.lib.bstats</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>xyz.xenondevs.particle</pattern>
                            <shadedPattern>cc.carm.plugin.moeteleport.lib.praticle</shadedPattern>
                        </relocation>
                        <relocation>
                            <pattern>org.json</pattern>
                            <shadedPattern>cc.carm.plugin.moeteleport.lib.json</shadedPattern>
                        </relocation>
                    </relocations>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.2</version>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                </configuration>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

</project>
