<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2021 Playful Digital Learning LLC
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.pdlpdl</groupId>
    <artifactId>pdl-mc-packet-log-parent</artifactId>
    <version>2.2.0</version>

    <packaging>pom</packaging>

    <name>PDL Minecraft Packet Log ::: Parent</name>
    <description>
        Parent Module for the library, and utilities, for reading and writting Minecraft Packet log files.
    </description>

    <url>https://github.com/PDLPDL/pdl-mc-packet-log</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <commons-cli.version>1.4</commons-cli.version>
        <minecraft-protocol-lib.version>1.18.2-1</minecraft-protocol-lib.version>
        <netty.version>4.1.45.Final</netty.version>
        <packetlib.version>2.1</packetlib.version>
        <slf4j.version>1.7.30</slf4j.version>

        <gpg.pinentry-mode>loopback</gpg.pinentry-mode>
    </properties>

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Arthur Naseef</name>
            <email>art@pdlpdl.com</email>
        </developer>
    </developers>

    <modules>
        <module>pdl-mc-packet-log-api</module>
        <module>pdl-mc-packet-log-core</module>
        <module>pdl-mc-packet-log-tool</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.pdlpdl</groupId>
                <artifactId>pdl-mc-packet-log-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.pdlpdl</groupId>
                <artifactId>pdl-mc-packet-log-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.pdlpdl</groupId>
                <artifactId>pdl-mc-packet-log-main</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.github.steveice10</groupId>
                <artifactId>mcprotocollib</artifactId>
                <version>${minecraft-protocol-lib.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.steveice10</groupId>
                <artifactId>packetlib</artifactId>
                <version>${packetlib.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>io.netty</groupId>
                        <artifactId>netty-all</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-codec</artifactId>
                <version>${netty.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-codec-dns</artifactId>
                <version>${netty.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-codec-http</artifactId>
                <version>${netty.version}</version>
            </dependency>
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-transport</artifactId>
                <version>${netty.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>${commons-cli.version}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>2.2.6.RELEASE</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>


            <!-- RELEASES -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh-pdl</serverId>
                    <nexusUrl>https://s01.oss.sonatype.org</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>

            <!-- GPG SIGNING -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <configuration>
                    <executable>gpg2</executable>
                </configuration>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>${gpg.pinentry-mode}</arg>
                            </gpgArguments>
                            <passphraseServerId>${gpg.serverId}</passphraseServerId>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- RELEASE JAVADOCS -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- RELEASE SOURCES -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
      <repository>
        <id>ossrh-releases</id>
        <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
      </repository>
    </distributionManagement>

    <scm>
        <connection>scm:git:git@github.com:PDLPDL/pdl-mc-packet-log.git</connection>
        <developerConnection>scm:git:git@github.com:PDLPDL/pdl-mc-packet-log.git</developerConnection>
        <url>git@github.com:PDLPDL/pdl-mc-packet-log.git</url>
        <tag>pdl-mc-packet-log-parent-2.2.0</tag>
    </scm>


    <!-- TODO: How to eliminate reliance on JITPACK.IO repo? -->

    <!--                               -->
    <!-- USE the JITPACK.IO REPOSITORY -->
    <!--  for the MCProtocolLib        -->
    <!--                               -->
    <repositories>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <profiles>
        <profile>
            <id>local-gpg-agent</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <gpg.pinentry-mode>default</gpg.pinentry-mode>
            </properties>
        </profile>
    </profiles>


</project>
