<?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>com.smallaswater.tips</groupId>
    <artifactId>Tips</artifactId>
    <version>2.2.3-SNAPSHOT</version>


    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.encoding>UTF-8</maven.compiler.encoding>
        <lib.GameCore.version>1.6.9</lib.GameCore.version>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>repo-lanink-cn</id>
            <url>https://repo.lanink.cn/repository/maven-snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>repo-lanink-cn</id>
            <url>https://repo.lanink.cn/repository/maven-releases/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>repo-lanink-cn</id>
            <url>https://repo.lanink.cn/repository/maven-public/</url>
        </repository>
        <repository>
            <id>opencollab-repo-release</id>
            <url>https://repo.opencollab.dev/maven-releases/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>opencollab-repo-snapshot</id>
            <url>https://repo.opencollab.dev/maven-snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

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

        <dependency>
            <groupId>cn.nukkit</groupId>
            <artifactId>nukkit</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
            <version>9.7</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>cn.lanink</groupId>
            <artifactId>MemoriesOfTime-GameCore</artifactId>
            <version>${lib.GameCore.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.smallaswater.ServerInfo</groupId>
            <artifactId>ServerInfo</artifactId>
            <version>1.0.10</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>me.onebone</groupId>
            <artifactId>economyapi</artifactId>
            <version>2.0.2</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.smallaswater.autoupdata</groupId>
            <artifactId>AutoUpData</artifactId>
            <version>1.3.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>

            <groupId>smallaswater.achievement</groupId>
            <artifactId>achievements</artifactId>
            <version>1.0-SNAPSHOT</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/achievements_v1.0-SNAPSHOT.jar</systemPath>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <encoding>${maven.compiler.encoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.google.code.maven-replacer-plugin</groupId>
                <artifactId>replacer</artifactId>
                <version>1.5.3</version>
                <executions>
                    <execution>
                        <id>add-version</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>replace</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <include>${project.basedir}/src/main/resources/plugin.yml</include>
                                <include>${project.basedir}/src/main/java/tip/utils/GameCoreDownload.java</include>
                            </includes>
                            <replacements>
                                <replacement>
                                    <token>version: ".*"</token>
                                    <value>version: "${project.version}"</value>
                                </replacement>
                                <replacement>
                                    <token>MINIMUM_GAME_CORE_VERSION = ".*"</token>
                                    <value>MINIMUM_GAME_CORE_VERSION = "${lib.GameCore.version}"</value>
                                </replacement>
                            </replacements>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.4</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <minimizeJar>false</minimizeJar>
                            <artifactSet>
                                <includes>
                                    <include>org.ow2.asm:asm</include>
                                    <!-- 其他依赖也可以添加在这里 -->
                                </includes>
                            </artifactSet>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>