<?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>
    <packaging>pom</packaging>

    <groupId>org.commonmark</groupId>
    <artifactId>commonmark-parent</artifactId>
    <version>0.24.0</version>
    <name>commonmark-java parent</name>
    <description>
        Java implementation of CommonMark, a specification of the Markdown format for turning plain text into formatted
        text.
    </description>
    <url>https://github.com/commonmark/commonmark-java</url>

    <modules>
        <module>commonmark</module>
        <module>commonmark-ext-autolink</module>
        <module>commonmark-ext-footnotes</module>
        <module>commonmark-ext-gfm-strikethrough</module>
        <module>commonmark-ext-gfm-tables</module>
        <module>commonmark-ext-heading-anchor</module>
        <module>commonmark-ext-image-attributes</module>
        <module>commonmark-ext-ins</module>
        <module>commonmark-ext-task-list-items</module>
        <module>commonmark-ext-yaml-front-matter</module>
        <module>commonmark-integration-test</module>
        <module>commonmark-test-util</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <commonmark.javadoc.location>${project.basedir}/../commonmark/target/apidocs/</commonmark.javadoc.location>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.13.0</version>
                    <configuration>
                        <release>11</release>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.4.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>3.1.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.6.3</version>
                    <configuration>
                        <excludePackageNames>*.internal,*.internal.*</excludePackageNames>
                        <!-- The offline links make links from extensions to core work. -->
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <offlineLinks>
                            <offlineLink>
                                <url>https://static.javadoc.io/org.commonmark/commonmark/${project.version}/
                                </url>
                                <location>${commonmark.javadoc.location}</location>
                            </offlineLink>
                        </offlineLinks>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.2.5</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <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://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    <stagingProgressTimeoutMinutes>10</stagingProgressTimeoutMinutes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <!-- For dependencies between modules -->
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark</artifactId>
                <version>0.24.0</version>
            </dependency>
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark-ext-autolink</artifactId>
                <version>0.24.0</version>
            </dependency>
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark-ext-image-attributes</artifactId>
                <version>0.24.0</version>
            </dependency>
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark-ext-ins</artifactId>
                <version>0.24.0</version>
            </dependency>
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark-ext-gfm-strikethrough</artifactId>
                <version>0.24.0</version>
            </dependency>
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark-ext-gfm-tables</artifactId>
                <version>0.24.0</version>
            </dependency>
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark-ext-heading-anchor</artifactId>
                <version>0.24.0</version>
            </dependency>
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark-ext-task-list-items</artifactId>
                <version>0.24.0</version>
            </dependency>
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark-ext-yaml-front-matter</artifactId>
                <version>0.24.0</version>
            </dependency>
            <dependency>
                <groupId>org.commonmark</groupId>
                <artifactId>commonmark-test-util</artifactId>
                <version>0.24.0</version>
            </dependency>

            <!-- Common test dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.1</version>
            </dependency>
            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-core</artifactId>
                <version>1.37</version>
            </dependency>
            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-generator-annprocess</artifactId>
                <version>1.37</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.8.12</version>
                        <configuration>
                            <excludes>
                                <!-- Classes from test-util -->
                                <exclude>org/commonmark/spec/*</exclude>
                                <exclude>org/commonmark/test/*</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>prepare-agent</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <licenses>
        <license>
            <name>BSD-2-Clause</name>
            <url>https://opensource.org/licenses/BSD-2-Clause</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Robin Stocker</name>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/commonmark/commonmark-java</connection>
        <developerConnection>scm:git:https://github.com/commonmark/commonmark-java</developerConnection>
        <url>https://github.com/commonmark/commonmark-java</url>
        <tag>commonmark-parent-0.24.0</tag>
    </scm>

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

</project>
