<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
  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>io.vitess</groupId>
    <artifactId>vitess-parent</artifactId>
    <version>2.1.0-rc.1</version>
  </parent>
  <artifactId>vitess-hadoop</artifactId>

  <dependencies>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
    </dependency>

    <dependency>
      <groupId>io.vitess</groupId>
      <artifactId>vitess-client</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vitess</groupId>
      <artifactId>vitess-client</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.vitess</groupId>
      <artifactId>vitess-grpc-client</artifactId>
    </dependency>

    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-mapreduce-client-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
      <!-- Include the test jar to reuse Hadoop testing utils -->
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
    </dependency>

    <!-- Dependencies with limited scope. -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Required for running MapReduceIT.java. -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.19.1</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <systemPropertyVariables>
            <vitess.client.testEnv>io.vitess.client.TestEnv</vitess.client.testEnv>
            <vitess.client.testEnv.portName>grpc_port</vitess.client.testEnv.portName>
            <vitess.client.factory>io.vitess.client.grpc.GrpcClientFactory</vitess.client.factory>
          </systemPropertyVariables>
        </configuration>
      </plugin>
      <!-- Exclusions for dependency:analyze: -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <configuration>
          <usedDependencies>
            <!-- Client is imported at runtime? -->
            <usedDependency>io.vitess:vitess-grpc-client</usedDependency>
            <!-- Required for running MapReduceIT.java. -->
            <usedDependency>org.apache.hadoop:hadoop-client</usedDependency>
          </usedDependencies>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
