<?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>io.github.projectunified</groupId>
    <artifactId>commonmark</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <name>commonmark</name>
    <description>More extensions for commonmark-java</description>
    <url>https://github.com/ProjectUnified/${project.name}</url>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://github.com/ProjectUnified/${project.name}/blob/master/LICENSE</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>HSGamer</name>
            <email>huynhqtienvtag@gmail.com</email>
            <url>https://github.com/HSGamer</url>
        </developer>
    </developers>
    <modules>
        <module>poi</module>
        <module>bbcode</module>
    </modules>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/ProjectUnified/${project.name}/issues</url>
    </issueManagement>

    <scm>
        <connection>scm:git:https://github.com/ProjectUnified/${project.name}.git</connection>
        <developerConnection>scm:git:git@github.com:ProjectUnified/${project.name}.git</developerConnection>
        <url>https://github.com/ProjectUnified/${project.name}</url>
    </scm>

    <properties>
        <java.version>1.8</java.version>
        <junit.version>5.10.2</junit.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.commonmark</groupId>
            <artifactId>commonmark</artifactId>
            <version>0.28.0</version>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
                <groupId>org.apache.maven.plugins</groupId>
                <version>3.15.0</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.4.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <id>attach-sources</id>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.12.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <id>attach-javadocs</id>
                    </execution>
                </executions>
                <configuration>
                    <outputDirectory>${project.build.directory}/reports</outputDirectory>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>central</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.8</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <!-- Prevent `gpg` from using pinentry programs -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.10.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <deploymentName>${project.name}</deploymentName>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>