<?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>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
    </parent>

    <groupId>org.cubeengine</groupId>
    <artifactId>dirigent</artifactId>
    <version>5.0.1</version>

    <name>Dirigent</name>
    <description>A readable and compact message composing library</description>
    <url>http://cubeisland.de/engine</url>
    <inceptionYear>2013</inceptionYear>

    <licenses>
        <license>
            <name>The MIT License (MIT)</name>
            <url>LICENSE.txt</url>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/CubeEngine/Dirigent</url>
        <connection>scm:git:https://github.com/CubeEngine/Dirigent</connection>
        <developerConnection>scm:git:git@github.com:CubeEngine/Dirigent</developerConnection>
        <tag>dirigent-5.0.1</tag>
    </scm>

    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <developers>
        <developer>
            <id>quick_wango</id>
            <name>Phillip Schichtel</name>
            <email>phillip.public@schich.tel</email>
            <roles>
                <role>Project Lead</role>
            </roles>
        </developer>
        <developer>
            <id>Faithcaio</id>
            <name>Anselm Brehme</name>
            <email>faithcaio@cubeisland.de</email>
            <roles>
                <role>Contributor</role>
            </roles>
        </developer>
        <developer>
            <id>boeserwolf91</id>
            <name>Stefan Wolf</name>
            <email>mail-github@swolf.me</email>
            <roles>
                <role>Contributor</role>
            </roles>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jdkVersion>1.6</jdkVersion>
        <releaseProfile>release</releaseProfile>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>clean install</defaultGoal>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>${releaseProfile}</releaseProfiles>
                    <goals>deploy</goals>
                    <arguments>-P${releaseProfile}</arguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.1</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <source>${jdkVersion}</source>
                    <target>${jdkVersion}</target>
                    <optimize>true</optimize>
                    <showDeprecation>true</showDeprecation>
                    <showWarnings>true</showWarnings>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <strictCheck>true</strictCheck>
                    <header>com/mycila/maven/plugin/license/templates/MIT.txt</header>
                    <includes>
                        <include>**/*.java</include>
                    </includes>
                    <properties>
                        <owner>Cube Island</owner>
                    </properties>
                    <mapping>
                        <java>SLASHSTAR_STYLE</java>
                    </mapping>
                </configuration>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>format</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- execute the goal mutationCoverage to produce it -->
                <groupId>org.pitest</groupId>
                <artifactId>pitest-maven</artifactId>
                <version>1.2.0</version>
                <configuration>
                    <targetClasses>
                        <param>org.cubeengine.dirigent*</param>
                    </targetClasses>
                    <targetTests>
                        <param>org.cubeengine.dirigent*</param>
                    </targetTests>
                    <verbose>false</verbose>
                    <failWhenNoMutations>false</failWhenNoMutations>
                    <withHistory>true</withHistory>
                    <mutators>
                        <mutator>CONDITIONALS_BOUNDARY</mutator>
                        <mutator>NEGATE_CONDITIONALS</mutator>
                        <mutator>REMOVE_CONDITIONALS</mutator>
                        <mutator>MATH</mutator>
                        <mutator>INCREMENTS</mutator>
                        <mutator>INVERT_NEGS</mutator>
                        <mutator>INLINE_CONSTS</mutator>
                        <mutator>RETURN_VALS</mutator>
                        <mutator>VOID_METHOD_CALLS</mutator>
                        <mutator>NON_VOID_METHOD_CALLS</mutator>
                        <mutator>CONSTRUCTOR_CALLS</mutator>
                        <mutator>EXPERIMENTAL_MEMBER_VARIABLE</mutator>
                        <mutator>EXPERIMENTAL_SWITCH</mutator>
                    </mutators>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.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>
                        <version>2.10.4</version>
                        <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>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>mutation</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-maven</artifactId>
                        <executions>
                            <execution>
                                <id>coverage</id>
                                <goals>
                                    <goal>mutationCoverage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
