<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>fi.jumi</groupId>
    <artifactId>parent</artifactId>
    <version>0.2.235</version>
    <packaging>pom</packaging>

    <description>
        Common test runner for the JVM. Natively supports running
        tests in parallel. Full stack from UI to class loading.
        Overcomes a bunch of limitations in JUnit's test runner, IDEs
        and build tools.
    </description>
    <url>http://jumi.fi</url>
    <inceptionYear>2011</inceptionYear>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>orfjackal</id>
            <name>Esko Luontola</name>
            <url>http://www.orfjackal.net/</url>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/orfjackal/jumi.git</connection>
        <url>https://github.com/orfjackal/jumi</url>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <minimumMavenVersion>3.0.3</minimumMavenVersion>
        <jumi-actors.version>0.1.196</jumi-actors.version>
    </properties>

    <prerequisites>
        <maven>${minimumMavenVersion}</maven>
    </prerequisites>

    <dependencies>

        <!-- Testing -->

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit-dep</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-assert</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Annotations -->

        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <dependencyManagement>
        <dependencies>

            <!-- Jumi -->

            <dependency>
                <groupId>fi.jumi</groupId>
                <artifactId>jumi-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>fi.jumi</groupId>
                <artifactId>jumi-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>fi.jumi</groupId>
                <artifactId>jumi-core</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
            </dependency>
            <dependency>
                <groupId>fi.jumi</groupId>
                <artifactId>jumi-launcher</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>fi.jumi</groupId>
                <artifactId>simpleunit</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Jumi Actors -->

            <dependency>
                <groupId>fi.jumi</groupId>
                <artifactId>jumi-actors</artifactId>
                <version>${jumi-actors.version}</version>
            </dependency>

            <!-- Networking -->

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty</artifactId>
                <version>3.5.5.Final</version>
            </dependency>

            <!-- Misc -->

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>13.0.1</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>2.4</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>2.0.1</version>
            </dependency>

            <dependency>
                <groupId>com.intellij</groupId>
                <artifactId>annotations</artifactId>
                <version>9.0.4</version>
            </dependency>

            <!-- Bytecode Manipulation -->

            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm-debug-all</artifactId>
                <version>4.0</version>
            </dependency>

            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib-nodep</artifactId>
                <version>2.2.2</version>
            </dependency>

            <!-- Testing -->

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit-dep</artifactId>
                <version>4.10</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>1.3</version>
            </dependency>

            <dependency>
                <groupId>org.easytesting</groupId>
                <artifactId>fest-assert</artifactId>
                <version>1.4</version>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>1.9.5-rc1</version>
            </dependency>

            <dependency>
                <groupId>com.google.caliper</groupId>
                <artifactId>caliper</artifactId>
                <version>0.5-rc1</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/*Test.class</include>
                    </includes>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>

                    <execution>
                        <!-- XXX: Using a different ID than in oss-parent to avoid overriding its checks by accident. See https://issues.sonatype.org/browse/OSSRH-2004 -->
                        <id>enforce-maven-3</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[${minimumMavenVersion},)</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>

                    <execution>
                        <id>enforce-banned-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <!-- We use junit-dep instead of junit -->
                                        <exclude>junit:junit</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                    </execution>

                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- XXX: It would be nicer to place these properties into pom.properties
                             by using maven-jar-plugin's /archive/pomPropertiesFile, but that is broken.
                             See http://jira.codehaus.org/browse/MSHARED-154 -->
                        <id>create-build-properties</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>
                                ${project.build.outputDirectory}/META-INF/maven/${project.groupId}/${project.artifactId}
                            </outputDirectory>
                            <overwrite>true</overwrite>
                            <resources>
                                <resource>
                                    <directory>${basedir}/../parent</directory>
                                    <includes>
                                        <include>build.properties</include>
                                    </includes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- XXX: workaround for an issue with maven-shade-plugin
                             There appears to be some stale state from previous executions of the Shade plugin,
                             which manifest themselves as "We have a duplicate" warnings on build and also as
                             some classes not being updated on build. -->
                        <id>delete-old-artifact</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <delete file="${project.build.directory}/${project.build.finalName}.${project.packaging}"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
        <pluginManagement>
            <plugins>

                <plugin>
                    <groupId>fi.jumi</groupId>
                    <artifactId>jumi-actors-maven-plugin</artifactId>
                    <version>${jumi-actors.version}</version>
                    <configuration>
                        <source>1.7</source>
                        <target>1.7</target>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.5</version>
                </plugin>

                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.5</version>
                </plugin>

                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.6</version>
                </plugin>

                <plugin>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.4</version>
                </plugin>

                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.1.2</version>
                </plugin>

                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.4</version>
                </plugin>

                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.7</version>
                </plugin>

                <plugin>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>2.0</version>
                    <configuration>
                        <!-- NOTE: This also minimizes jumi-core when it's included in jumi-daemon -->
                        <minimizeJar>true</minimizeJar>
                        <!-- Keep the generated POM file out of the base directory -->
                        <dependencyReducedPomLocation>
                            ${project.build.directory}/dependency-reduced-pom.xml
                        </dependencyReducedPomLocation>
                    </configuration>
                </plugin>

                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.12.3</version>
                </plugin>

                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.12.3</version>
                </plugin>

                <plugin>
                    <artifactId>maven-invoker-plugin</artifactId>
                    <version>1.7</version>
                </plugin>

                <plugin>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.5.1</version>
                </plugin>

                <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.7</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>1.3.1</version>
                </plugin>

                <plugin>
                    <groupId>org.pitest</groupId>
                    <artifactId>pitest-maven</artifactId>
                    <version>0.28</version>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>coverage-report</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-maven</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>mutationCoverage</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <threads>4</threads>
                            <jvmArgs>
                                <arg>-ea</arg>
                                <!-- XXX: PIT doesn't generate correct stack map frames for Java 7 -->
                                <arg>-XX:-UseSplitVerifier</arg>
                            </jvmArgs>
                            <targetClasses>
                                <pattern>fi.jumi.*</pattern>
                            </targetClasses>
                            <targetTests>
                                <pattern>fi.jumi.*</pattern>
                            </targetTests>
                            <failWhenNoMutations>false</failWhenNoMutations>
                            <timestampedReports>false</timestampedReports>
                            <mutators>
                                <mutator>ALL</mutator>
                            </mutators>
                            <detectInlinedCode>true</detectInlinedCode>
                            <mutateStaticInitializers>true</mutateStaticInitializers>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
