<?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>

    <name>SefiLib</name>
    <description>This library provides tools to help in the development of Slimefun Addons</description>
    <url>https://github.com/Sefiraat/SefiLib</url>

    <licenses>
        <license>
            <name>GPL-3.0 license</name>
            <url>https://github.com/Sefiraat/SefiLib/blob/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Sefiraat</name>
            <organization>Sefiraat</organization>
            <organizationUrl>http://www.sefiraat.dev</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/sefiraat/sefilib.git</connection>
        <developerConnection>scm:git:ssh://github.com:sefiraat/sefilib.git</developerConnection>
        <url>https://github.com/sefiraat/SefiLib/tree/master</url>
    </scm>

    <groupId>dev.sefiraat</groupId>
    <artifactId>SefiLib</artifactId>
    <version>0.2.4</version>

    <properties>
        <maven.compiler.source>16</maven.compiler.source>
        <maven.compiler.target>16</maven.compiler.target>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>spigot-repo</id>
            <url>https://hub.spigotmc.org/nexus/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>jitpack.io</id>
            <url>https://jitpack.io</url>
        </repository>
    </repositories>

    <!-- Thanks to dough here! -->
    <profiles>
        <profile>
            <id>release</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>

                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>

                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.4.0</version>

                        <configuration>
                            <includeDependencySources>false</includeDependencySources>

                            <links>
                                <link>https://hub.spigotmc.org/javadocs/spigot/</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-release-plugin</artifactId>
                        <version>2.5.3</version>

                        <configuration>
                            <goals>deploy</goals>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.13</version>
                        <extensions>true</extensions>

                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.0.1</version>

                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>

                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>org.spigotmc</groupId>
            <artifactId>spigot-api</artifactId>
            <version>1.19.4-R0.1-SNAPSHOT</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.Slimefun</groupId>
            <artifactId>Slimefun4</artifactId>
            <version>RC-33</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>annotations</artifactId>
            <version>3.0.1u2</version>
        </dependency>
        <dependency>
            <groupId>io.github.baked-libs</groupId>
            <artifactId>dough-api</artifactId>
            <version>1.2.0</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

</project>