<?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>com.groupcdg.pitest</groupId>
    <artifactId>pitest-extended-operators-parent</artifactId>
    <version>${revision}</version>

    <name>pitest-extended-operators</name>
    <description>Extended mutation operators</description>

    <packaging>pom</packaging>

    <properties>
        <!-- this revision number used only for local builds, release version is taken from release branch name -->
        <revision>dev</revision>

        <pitest.version>1.7.1</pitest.version>
        <cdg.version>0.1.0</cdg.version>
        <cdg.licence.version>0.0.4</cdg.licence.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <git.repository>GroupCDG-Labs/pitest-extended-mutators</git.repository>
    </properties>

    <developers>
        <developer>
            <id>henry</id>
            <name>Henry Coles</name>
            <email>henry.coles@groupcdg.com</email>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>CDG Pitest Licence</name>
            <distribution>repo</distribution>
            <url>https://groupcdg-labs.github.io/Licence.txt</url>
            <comments>Usage requires the purchase (or grant) of a licence key</comments>
        </license>
    </licenses>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <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>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>pitest</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-maven</artifactId>
                        <executions>
                            <execution>
                                <id>pitest</id>
                                <phase>test-compile</phase>
                                <goals>
                                    <goal>mutationCoverage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.groupcdg</groupId>
                    <artifactId>pitest-github-maven-plugin</artifactId>
                    <version>${cdg.version}</version>
                </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>
                    <configuration>
                        <gpgArguments>
                            <arg>--pinentry-mode</arg>
                            <arg>loopback</arg>
                        </gpgArguments>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-scm-plugin</artifactId>
                    <version>1.11.2</version>
                    <configuration>
                        <tag>${project.version}</tag>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <showWarnings>true</showWarnings>
                        <release>8</release>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.22.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-Vendor>${project.groupId}</Implementation-Vendor>
                                <Implementation-Title>${project.artifactId}</Implementation-Title>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.pitest</groupId>
                    <artifactId>pitest-maven</artifactId>
                    <version>${pitest.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.pitest</groupId>
                            <artifactId>pitest-junit5-plugin</artifactId>
                            <version>0.15</version>
                        </dependency>
                        <dependency>
                            <groupId>com.groupcdg</groupId>
                            <artifactId>pitest-git-plugin</artifactId>
                            <version>${cdg.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <threads>2</threads>
                        <failWhenNoMutations>false</failWhenNoMutations>
                        <timestampedReports>false</timestampedReports>
                        <mutators>STRONGER</mutators>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>flatten-maven-plugin</artifactId>
                    <version>1.2.5</version>
                    <configuration>
                        <updatePomFile>true</updatePomFile>
                        <flattenMode>resolveCiFriendliesOnly</flattenMode>
                    </configuration>
                    <executions>
                        <execution>
                            <id>flatten</id>
                            <phase>package</phase>
                            <goals>
                                <goal>flatten</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>flatten.clean</id>
                            <phase>clean</phase>
                            <goals>
                                <goal>clean</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.3</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.7</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.groupcdg</groupId>
                <artifactId>cdg-pitest-licence-lib</artifactId>
                <version>${cdg.licence.version}</version>
            </dependency>
            <dependency>
                <groupId>org.pitest</groupId>
                <artifactId>pitest</artifactId>
                <version>${pitest.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-entry</artifactId>
                <version>${pitest.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.groupcdg</groupId>
                <artifactId>pitest-annotations</artifactId>
                <version>${cdg.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.pitest</groupId>
                <artifactId>pitest-entry</artifactId>
                <version>${pitest.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.pitest</groupId>
                <artifactId>pitest</artifactId>
                <version>${pitest.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.thoughtworks.xstream</groupId>
                <artifactId>xstream</artifactId>
                <version>1.4.18</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter</artifactId>
                <version>5.8.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>3.14.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>nl.jqno.equalsverifier</groupId>
                <artifactId>equalsverifier</artifactId>
                <version>3.5</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <scm>
        <developerConnection>scm:git:https://github.com/${git.repository}.git</developerConnection>
        <tag>HEAD</tag>
    </scm>
    <distributionManagement>
        <snapshotRepository>
            <id>github</id>
            <name>GitHub</name>
            <url>https://maven.pkg.github.com/${git.repository}</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <!-- remove me when pitest snapshot dependency gone -->
    <repositories>
        <repository>
            <id>sonatype</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <modules>
        <module>extended-mutators</module>
        <module>verification</module>
    </modules>

</project>
