<?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>

    <!-- BASIC INFORMATION ABOUT THE PROJECT -->

    <groupId>com.github.writethemfirst</groupId>
    <artifactId>approvals-java</artifactId>
    <version>0.3</version>

    <name>Approvals-Java</name>
    <description>Approval testing library for Java. Alleviates the burden of hand-writing assertions.</description>
    <inceptionYear>2018</inceptionYear>

    <url>https://github.com/WriteThemFirst/approvals-java/</url>

    <!-- TOOLING -->

    <issueManagement>
        <system>github</system>
        <url>https://github.com/WriteThemFirst/approvals-java/issues</url>
    </issueManagement>

    <ciManagement>
        <system>travis</system>
        <url>https://travis-ci.org/WriteThemFirst/approvals-java</url>
    </ciManagement>

    <!-- SCM CONNECTION -->

    <scm>
        <connection>scm:git:https://github.com/WriteThemFirst/approvals-java.git</connection>
        <developerConnection>scm:git:https://github.com/WriteThemFirst/approvals-java.git</developerConnection>
        <url>https://github.com/WriteThemFirst/approvals-java</url>
        <tag>HEAD</tag>
    </scm>

    <!-- LICENSE -->

    <licenses>
        <license>
            <name>GNU GENERAL PUBLIC LICENSE Version 3</name>
            <url>https://www.gnu.org/licenses/gpl-3.0.en.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!-- DEVELOPERS -->

    <organization>
        <name>Write Them First!</name>
        <url>https://github.com/WriteThemFirst</url>
    </organization>

    <developers>
        <developer>
            <name>Michel Daviot</name>
            <id>tyrcho</id>
            <url>https://github.com/tyrcho</url>
        </developer>
        <developer>
            <name>Antoine Neveux</name>
            <id>aneveux</id>
            <url>https://github.com/aneveux</url>
        </developer>
        <developer>
            <name>Jean-Marc Desprez</name>
            <id>jmdesprez</id>
        </developer>
        <developer>
            <name>Aurelie Ignaszak</name>
            <id>Lilous</id>
        </developer>
    </developers>

    <!-- DISTRIBUTION -->

    <distributionManagement>
        <!-- https://bintray.com/writethemfirst/maven/approvals-java -->
        <repository>
            <id>bintray</id>
            <name>writethemfirst-maven</name>
            <url>https://api.bintray.com/maven/writethemfirst/maven/approvals-java/;publish=1</url>
        </repository>
        <!-- https://www.jfrog.com/confluence/display/RTF/Deploying+Snapshots+to+oss.jfrog.org -->
        <snapshotRepository>
            <id>bintray</id>
            <name>jfrog-oss-snapshots</name>
            <url>https://oss.jfrog.org/artifactory/oss-snapshot-local</url>
        </snapshotRepository>
    </distributionManagement>

    <!-- PROJECT PROPERTIES -->

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.target>1.8</maven.compiler.target>
        <maven.compiler.source>1.8</maven.compiler.source>
        <junit.jupiter.version>5.1.0</junit.jupiter.version>
        <junit.platform.version>1.0.2</junit.platform.version>
    </properties>

    <!-- DEPENDENCIES -->

    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.github.glytching</groupId>
            <artifactId>junit-extensions</artifactId>
            <version>2.0.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.9.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>2.15.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- BUILD PLUGINS -->

    <build>
        <plugins>
            <!-- AUTOMATED LICENSE HEADER -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <basedir>${basedir}</basedir>
                    <header>etc/header.txt</header>
                    <quiet>false</quiet>
                    <failIfMissing>true</failIfMissing>
                    <aggregate>true</aggregate>
                    <strictCheck>true</strictCheck>
                    <includes>
                        <include>**/src/**</include>
                    </includes>
                    <excludes>
                        <exclude>**/**.approved</exclude>
                        <exclude>**/**.received</exclude>
                    </excludes>
                    <useDefaultExcludes>true</useDefaultExcludes>
                    <mapping>
                        <ecmd>XML_STYLE</ecmd>
                        <mwe>XML_STYLE</mwe>
                        <ext>SLASHSTAR_STYLE</ext>
                        <xpt>XML_STYLE</xpt>
                        <java>SLASHSTAR_STYLE</java>
                        <kt>SLASHSTAR_STYLE</kt>
                        <aj>SLASHSTAR_STYLE</aj>
                        <properties>SCRIPT_STYLE</properties>
                        <xml>XML_STYLE</xml>
                    </mapping>
                    <useDefaultMapping>false</useDefaultMapping>
                    <properties>
                        <owner>Write Them First!</owner>
                    </properties>
                    <encoding>UTF-8</encoding>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- UNIT TESTS -->
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19</version>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.platform</groupId>
                        <artifactId>junit-platform-surefire-provider</artifactId>
                        <version>${junit.platform.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <!-- TEST COVERAGE -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- TEST MUTATION -->
            <plugin>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
                <version>1.3.0</version>
                <dependencies>
                    <dependency>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-junit5-plugin</artifactId>
                        <version>0.3</version>
                    </dependency>
                </dependencies>
            </plugin>
            <!-- ATTACHING SOURCE JAR WHEN PACKAGING -->
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- ATTACHING JAVADOC JAR WHEN PACKAGING + MARKDOWN JAVADOC -->
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <doclet>ch.raffael.doclets.pegdown.PegdownDoclet</doclet>
                    <docletArtifact>
                        <groupId>ch.raffael.pegdown-doclet</groupId>
                        <artifactId>pegdown-doclet</artifactId>
                        <version>1.1</version>
                    </docletArtifact>
                    <useStandardDocletOptions>true</useStandardDocletOptions>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
