<?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">
  <parent>
    <groupId>org.arquillian.smart.testing</groupId>
    <artifactId>smart-testing-parent</artifactId>
    <version>0.0.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>maven-lifecycle-extension</artifactId>

  <properties>
    <version.maven.plugin.shade>3.0.0</version.maven.plugin.shade>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${version.maven}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.arquillian.smart.testing</groupId>
      <artifactId>core</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!--
      This explicit include prevents us from adding new implementations dynamically,
      for this purpose we should probably try something like Chameleon does - automatically pulling in all
      the jars based on meta-file (e.g.json).
       - Adding jar as below as an <extension> in <extensions.xml> does not work
       - TODO: which classloader is in use for Maven Extensions?ow JDK 9 would affect that?
    -->
    <dependency>
      <groupId>org.arquillian.smart.testing</groupId>
      <artifactId>strategy-affected</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.arquillian.smart.testing</groupId>
      <artifactId>strategy-changed</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.arquillian.smart.testing</groupId>
      <artifactId>strategy-failed</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>
    <!-- -->

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.stefanbirkner</groupId>
      <artifactId>system-rules</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
      <version>${version.mockito}</version>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
        <version>1.7.1</version>
        <executions>
          <execution>
            <goals>
              <goal>generate-metadata</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${version.maven.plugin.shade}</version>
        <configuration>
          <createDependencyReducedPom>false</createDependencyReducedPom>
          <minimizeJar>true</minimizeJar>
          <shadedArtifactAttached>true</shadedArtifactAttached>
          <shadedClassifierName>shaded</shadedClassifierName>
          <artifactSet>
            <excludes>
              <exclude>org.slf4j:*</exclude>
            </excludes>
          </artifactSet>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
  </build>

</project>
