<?xml version="1.0" encoding="UTF-8"?>
<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>org.powernukkit.bedrock.protocol</groupId>
    <artifactId>parent</artifactId>
    <packaging>pom</packaging>
    <version>2.9.6-PN.1</version>
    <name>Bedrock Edition Protocol (Parent)</name>
    <description>A protocol library for Minecraft</description>
    <url>https://github.com/PowerNukkit/Bedrock-Protocol</url>
    <inceptionYear>2018</inceptionYear>

    <modules>
        <module>common</module>
        <module>bedrock</module>
    </modules>

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

    <organization>
        <name>PowerNukkit</name>
        <url>https://github.com/PowerNukkit</url>
    </organization>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/PowerNukkit/Bedrock-Protocol/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:https://github.com/PowerNukkit/Bedrock-Protocol.git</connection>
        <developerConnection>scm:git:git@github.com:PowerNukkit/Bedrock-Protocol.git</developerConnection>
        <url>https://github.com/PowerNukkit/Bedrock-Protocol</url>
    </scm>

    <distributionManagement>
        <repository>
            <id>powernukkit-releases</id>
            <name>powernukkit-releases</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>powernukkit-snapshots</id>
            <name>powernukkit-snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <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>
        <maven.build.timestamp.format>HHmm-ddMMyyyy</maven.build.timestamp.format>
        <network.version>1.6.28-PN.3</network.version>
        <skipGpg>false</skipGpg>
    </properties>

    <developers>
        <developer>
            <id>PowerNukkit</id>
            <url>https://powernukkit.org</url>
            <organization>PowerNukkit</organization>
            <organizationUrl>https://github.com/PowerNukkit</organizationUrl>
        </developer>
        <developer>
            <id>CloudburstMC</id>
            <url>https://cloudburstmc.org</url>
            <organization>CloudburstMC</organization>
            <organizationUrl>https://github.com/CloudburstMC</organizationUrl>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>PowerNukkit Bedrock Protocol contributors</name>
            <url>https://github.com/PowerNukkit/Bedrock-Protocol/graphs/contributors</url>
        </contributor>
    </contributors>

    <repositories>
        <repository>
            <id>powernukkit-snapshots</id>
            <name>powernukkit-snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </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.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.22</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>3.0.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.8.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <links>
                        <link>https://netty.io/4.1/api</link>
                        <link>https://ci.nukkitx.com/job/NukkitX/job/math/job/master/javadoc</link>
                    </links>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>3.0.0-M1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>3.0.0-M1</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.10</version>
                <executions>
                    <execution>
                        <id>regex-property</id>
                        <goals>
                            <goal>regex-property</goal>
                        </goals>
                        <configuration>
                            <name>module.name</name>
                            <value>${project.groupId}.${project.artifactId}</value>
                            <regex>-</regex>
                            <replacement>.</replacement>
                            <failIfNoMatch>false</failIfNoMatch>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skip>${skipGpg}</skip>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <archive>
                            <manifestEntries>
                                <Automatic-Module-Name>${module.name}</Automatic-Module-Name>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>

