<?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.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>25</version>
    <relativePath />
  </parent>

  <groupId>org.arquillian.smart.testing</groupId>
  <artifactId>smart-testing-parent</artifactId>
  <version>0.0.10</version>
  <packaging>pom</packaging>

  <name>Smart Testing</name>
  <description>Smart Testing is a tool that knows which tests you want to run</description>

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

  <scm>
    <connection>scm:git:git://git@github.com:arquillian/smart-testing.git</connection>
    <developerConnection>scm:git:ssh://github.com/arquillian/smart-testing.git</developerConnection>
    <url>git://github.com/arquillian/smart-testing.git</url>
    <tag>0.0.10</tag>
  </scm>

  <developers>
    <developer>
      <id>arquillian.org</id>
      <name>Arquillian Community</name>
      <organization>arquillian.org</organization>
      <organizationUrl>http://arquillian.org</organizationUrl>
    </developer>
  </developers>

  <properties>
    <version.junit>4.12</version.junit>
    <version.junit5>5.0.2</version.junit5>
    <version.surefire>2.19.1</version.surefire>
    <version.maven>3.3.9</version.maven>
    <version.assertj-core>3.8.0</version.assertj-core>
    <version.system-rules>1.17.0</version.system-rules>
    <version.javassist>3.21.0-GA</version.javassist>
    <version.fast-classpath-scanner>2.9.3</version.fast-classpath-scanner>
    <version.jgrapht>1.1.0</version.jgrapht>
    <version.shrinkwrap.resolver>3.1.3</version.shrinkwrap.resolver>
    <version.snakeyaml>1.19</version.snakeyaml>
    <version.mockito>2.13.0</version.mockito>
    <version.jgit>4.9.1.201712030800-r</version.jgit>
    <version.arquillian.spacelift>1.0.2</version.arquillian.spacelift>
    <version.findbugs.annotations>3.0.1</version.findbugs.annotations>

    <version.maven.plugin.shade>3.0.0</version.maven.plugin.shade>
    <version.maven.plugin.deploy>2.8.2</version.maven.plugin.deploy>

    <!-- default settings for surefire parallel execution. Overwritten for travis due to JVM crashes -->
    <surefire.fork.count>4</surefire.fork.count>
    <surefire.thread.count>8</surefire.thread.count>
    <surefire.reuse.forks>true</surefire.reuse.forks>

    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <modules>
    <module>core</module>
    <module>api</module>
    <module>surefire-provider</module>
    <module>junit-test-result-parser</module>
    <module>strategies/affected</module>
    <module>strategies/changed</module>
    <module>strategies/failed</module>
    <module>strategies/categorized</module>
    <module>mvn-extension</module>
    <module>functional-tests/git-rules</module>
    <module>functional-tests/test-bed</module>
    <module>known-surefire-providers</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.arquillian.smart.testing</groupId>
        <artifactId>core</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.arquillian.smart.testing</groupId>
        <artifactId>core</artifactId>
        <classifier>shaded</classifier>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.arquillian.smart.testing</groupId>
        <artifactId>junit-test-result-parser</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.arquillian.smart.testing</groupId>
        <artifactId>known-surefire-providers</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.arquillian.smart.testing</groupId>
        <artifactId>strategy-changed</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.arquillian.smart.testing</groupId>
        <artifactId>strategy-affected</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.arquillian.smart.testing</groupId>
        <artifactId>strategy-failed</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>${version.javassist}</version>
      </dependency>
      <dependency>
        <groupId>org.jgrapht</groupId>
        <artifactId>jgrapht-core</artifactId>
        <version>${version.jgrapht}</version>
      </dependency>
      <dependency>
        <groupId>org.yaml</groupId>
        <artifactId>snakeyaml</artifactId>
        <version>${version.snakeyaml}</version>
      </dependency>
      <dependency>
        <groupId>io.github.lukehutch</groupId>
        <artifactId>fast-classpath-scanner</artifactId>
        <version>${version.fast-classpath-scanner}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jgit</groupId>
        <artifactId>org.eclipse.jgit</artifactId>
        <version>${version.jgit}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter-api</artifactId>
        <version>${version.junit5}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${version.assertj-core}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <scope>test</scope>
        <version>${version.mockito}</version>
      </dependency>
      <dependency>
        <groupId>com.github.stefanbirkner</groupId>
        <artifactId>system-rules</artifactId>
        <version>${version.system-rules}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>annotations</artifactId>
        <version>${version.findbugs.annotations}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.arquillian.spacelift</groupId>
        <artifactId>arquillian-spacelift</artifactId>
        <version>${version.arquillian.spacelift}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.arquillian.smart.testing</groupId>
        <artifactId>core</artifactId>
        <version>${project.version}</version>
        <classifier>tests</classifier>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>annotations</artifactId>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${version.maven.plugin.deploy}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${version.surefire}</version>
        <executions>
          <execution>
            <id>default-test</id>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <forkCount>${surefire.fork.count}</forkCount>
              <threadCount>${surefire.thread.count}</threadCount>
              <reuseForks>${surefire.reuse.forks}</reuseForks>
              <argLine>-Xmx1024m</argLine>
              <parallel>classesAndMethods</parallel>
              <excludedGroups>net.jcip.annotations.NotThreadSafe</excludedGroups>
            </configuration>
          </execution>
          <execution>
            <id>not-thread-safe</id>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <reuseForks>false</reuseForks>
              <groups>net.jcip.annotations.NotThreadSafe</groups>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <tagNameFormat>@{project.version}</tagNameFormat>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <pushChanges>false</pushChanges>
          <localCheckout>true</localCheckout>
          <preparationGoals>clean install</preparationGoals>
          <releaseProfiles>attach-javadoc-and-sources</releaseProfiles>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>travis</id>
      <properties>
        <surefire.fork.count>2</surefire.fork.count>
        <surefire.thread.count>2</surefire.thread.count>
      </properties>
    </profile>    
    <profile>
      <id>attach-javadoc-and-sources</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
