<?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.chutneytesting</groupId>
        <artifactId>chutney-parent</artifactId>
        <version>1.3.6</version>
    </parent>

    <artifactId>engine</artifactId>

    <dependencies>

        <dependency>
            <groupId>com.chutneytesting</groupId>
            <artifactId>task-spi</artifactId>
        </dependency>
        <dependency>
            <groupId>com.chutneytesting</groupId>
            <artifactId>tools</artifactId>
        </dependency>

        <!--External -->
        <dependency>
            <groupId>io.reactivex.rxjava2</groupId>
            <artifactId>rxjava</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-jaxb-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-paranamer</artifactId>
        </dependency>
        <!-- For ugly hack in InputParameterResolver -->
        <dependency>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
            <version>2.4.2</version>
        </dependency>
        <!-- Test -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock-standalone</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <!-- Mutation Testing -->
        <profile>
            <id>mutation</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-maven</artifactId>
                        <version>${pitest.version}</version>
                        <configuration>

                            <!-- Targets -->
                            <targetClasses>
                                <param>com.chutneytesting.*</param>
                            </targetClasses>
                            <targetTests>
                                <param>com.chutneytesting.*Test</param>
                            </targetTests>
                            <excludedClasses>
                                <class>com.chutneytesting.*.Immutable*</class>
                            </excludedClasses>

                            <!-- Reporting -->
                            <outputFormats>
                                <outputFormat>HTML</outputFormat>
                            </outputFormats>
                            <timestampedReports>false</timestampedReports>
                            <verbose>false</verbose>

                            <!-- Mutations -->
                            <mutators>
                                <mutator>CONDITIONALS_BOUNDARY</mutator>
                                <mutator>INCREMENTS</mutator>
                                <mutator>INVERT_NEGS</mutator>
                                <mutator>MATH</mutator>
                                <mutator>NEGATE_CONDITIONALS</mutator>
                                <mutator>VOID_METHOD_CALLS</mutator>
                                <mutator>EMPTY_RETURNS</mutator>
                                <mutator>PRIMITIVE_RETURNS</mutator>
                                <mutator>REMOVE_CONDITIONALS</mutator>
                            </mutators>

                            <!-- Duration -->
                            <timeoutFactor>1.25</timeoutFactor>
                            <timeoutConstant>3000</timeoutConstant>
                            <maxMutationsPerClass>0</maxMutationsPerClass>
                            <withHistory>true</withHistory>
                            <threads>1</threads>

                        </configuration>
                        <executions>
                            <execution>
                                <id>run-mutation-tests</id>
                                <phase>test</phase>
                                <goals>
                                    <goal>mutationCoverage</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
