<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>io.github.congcoi123</groupId>
    <artifactId>tenio-core</artifactId>
    <version>0.6.8</version>
    <packaging>jar</packaging>

    <name>${project.groupId}:${project.artifactId}</name>
    <description>
        TenIO is a java NIO (Non-blocking I/O) based server specifically designed for multiplayer games.
        It supports UDP and TCP transports which are handled by Netty for high-speed network transmission.
        This is the core module for the main process of the framework.
    </description>
    <url>https://github.com/congcoi123/tenio</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://github.com/congcoi123/tenio-core/blob/master/LICENSE</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Kong</name>
            <email>congcoi123@gmail.com</email>
            <organization>Kong</organization>
            <organizationUrl>https://congcoi123.dev</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/congcoi123/tenio-core.git</connection>
        <developerConnection>scm:git:ssh://github.com:congcoi123/tenio-core.git</developerConnection>
        <url>https://github.com/congcoi123/tenio-core/tree/master</url>
    </scm>

    <properties>
        <io.github.congcoi123.tenio.common>0.6.8</io.github.congcoi123.tenio.common>

        <io.netty.version>4.2.10.Final</io.netty.version>
        <org.eclipse.jetty.server.version>12.1.6</org.eclipse.jetty.server.version>
        <org.eclipse.jetty.ee10.servlet.version>12.1.6</org.eclipse.jetty.ee10.servlet.version>
        <jakarta.servlet.api.version>6.1.0</jakarta.servlet.api.version>
        <kcp-base.version>1.6.1</kcp-base.version>
        <javax.servlet.version>2.5</javax.servlet.version>
        <org.json.version>20240303</org.json.version>
        <com.fasterxml.jackson.core.version>2.18.6</com.fasterxml.jackson.core.version>
        <org.jline.version>3.27.0</org.jline.version>
        <org.apache.commons.lang3.version>3.19.0</org.apache.commons.lang3.version>
        <org.apache.httpcomponents.httpcore.version>4.4.16</org.apache.httpcomponents.httpcore.version>

        <logging.log4j.version>2.25.3</logging.log4j.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <org.junit.jupiter.version>5.11.2</org.junit.jupiter.version>
        <org.junit.platform.version>1.11.2</org.junit.platform.version>
        <org.mockito.core.version>5.14.1</org.mockito.core.version>

        <maven.compiler.plugin.version>3.15.0</maven.compiler.plugin.version>
        <jdk.release>17</jdk.release>
        <jdk.vendor>oracle</jdk.vendor>

        <maven.checkstyle.version>3.6.0</maven.checkstyle.version>
        <maven.source.plugin.version>3.2.0</maven.source.plugin.version>
        <maven.javadoc.plugin.version>3.12.0</maven.javadoc.plugin.version>
        <maven.gpg.plugin.version>3.2.7</maven.gpg.plugin.version>
        <jacoco.maven.plugin.version>0.8.14</jacoco.maven.plugin.version>
        <coveralls.maven.plugin.version>4.3.0</coveralls.maven.plugin.version>

        <maven.compiler.target>17</maven.compiler.target>
        <maven.compiler.source>17</maven.compiler.source>
    </properties>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>tenio-common</artifactId>
            <version>${io.github.congcoi123.tenio.common}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${logging.log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${logging.log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
            <version>${io.netty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>${org.eclipse.jetty.server.version}</version>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty.ee10</groupId>
            <artifactId>jetty-ee10-servlet</artifactId>
            <version>${org.eclipse.jetty.ee10.servlet.version}</version>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <version>${jakarta.servlet.api.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.l42111996</groupId>
            <artifactId>kcp-base</artifactId>
            <version>${kcp-base.version}</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>${org.json.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${com.fasterxml.jackson.core.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${org.apache.commons.lang3.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>${org.apache.httpcomponents.httpcore.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jline</groupId>
            <artifactId>jline</artifactId>
            <version>${org.jline.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jline</groupId>
            <artifactId>jline-terminal-jna</artifactId>
            <version>${org.jline.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${org.junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${org.junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${org.junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-runner</artifactId>
            <version>${org.junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>${org.junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-suite-engine</artifactId>
            <version>${org.junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${org.mockito.core.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${org.mockito.core.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <testSourceDirectory>src/test/java</testSourceDirectory>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <!-- Compiler -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.version}</version>

                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <failsOnError>true</failsOnError>
                    <linkXRef>false</linkXRef>
                </configuration>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Attach source jars -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-source</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Attach javadoc jar -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>jar</goal>
                            <goal>javadoc</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
                    <detectJavaApiLink>false</detectJavaApiLink>
                </configuration>
            </plugin>
            <!-- Sign artifacts for uploading to maven central -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>${maven.gpg.plugin.version}</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.9.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                </configuration>
            </plugin>
            <!-- jacoco report -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report-aggregate</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report-aggregate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- coveralls service -->
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>${coveralls.maven.plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>javax.xml.bind</groupId>
                        <artifactId>jaxb-api</artifactId>
                        <version>2.3.1</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

</project>
