<?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>
    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>central-pom</artifactId>
        <version>3.0.98</version>
    </parent>

    <packaging>pom</packaging>

    <groupId>com.atlassian.commonmark</groupId>
    <artifactId>commonmark-parent</artifactId>
    <version>0.8.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/atlassian/commonmark-java</url>

    <modules>
        <module>commonmark</module>
        <module>commonmark-ext-autolink</module>
        <module>commonmark-ext-gfm-strikethrough</module>
        <module>commonmark-ext-gfm-tables</module>
        <module>commonmark-ext-heading-anchor</module>
        <module>commonmark-ext-ins</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>
        <!-- Don't automatically publish artifacts to Central, we might want to inspect them first. -->
        <nexus.staging.autoRelease>false</nexus.staging.autoRelease>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <source>7</source>
                        <target>7</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <excludePackageNames>*.internal,*.internal.*</excludePackageNames>
                        <!-- The offline links make links from extensions to core work. -->
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <offlineLinks>
                            <offlineLink>
                                <url>http://static.javadoc.io/com.atlassian.commonmark/commonmark/${project.version}/</url>
                                <location>${commonmark.javadoc.location}</location>
                            </offlineLink>
                        </offlineLinks>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <!-- There's lots of potential for things to go wrong when publishing to Central, so
                             don't push the tag and master automatically (which happens before publishing). Also
                             requires "localCheckout" for release:perform to work. -->
                        <pushChanges>false</pushChanges>
                        <localCheckout>true</localCheckout>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <!-- For dependencies between modules -->
            <dependency>
                <groupId>com.atlassian.commonmark</groupId>
                <artifactId>commonmark</artifactId>
                <version>0.8.0</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.commonmark</groupId>
                <artifactId>commonmark-ext-autolink</artifactId>
                <version>0.8.0</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.commonmark</groupId>
                <artifactId>commonmark-ext-ins</artifactId>
                <version>0.8.0</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.commonmark</groupId>
                <artifactId>commonmark-ext-gfm-strikethrough</artifactId>
                <version>0.8.0</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.commonmark</groupId>
                <artifactId>commonmark-ext-gfm-tables</artifactId>
                <version>0.8.0</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.commonmark</groupId>
                <artifactId>commonmark-ext-yaml-front-matter</artifactId>
                <version>0.8.0</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.commonmark</groupId>
                <artifactId>commonmark-test-util</artifactId>
                <version>0.8.0</version>
            </dependency>

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

    <profiles>
        <profile>
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>0.7.7.201606060606</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>
                    <plugin>
                        <groupId>org.eluder.coveralls</groupId>
                        <artifactId>coveralls-maven-plugin</artifactId>
                        <version>4.2.0</version>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

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

    <developers>
        <developer>
            <name>Robin Stocker</name>
            <email>rstocker@atlassian.com</email>
            <organization>Atlassian</organization>
            <organizationUrl>https://www.atlassian.com/</organizationUrl>
        </developer>
    </developers>

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

</project>
