<?xml version="1.0"?>
<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.twitter.elephantbird</groupId>
    <artifactId>elephant-bird</artifactId>
    <version>4.4</version>
    <relativePath>..</relativePath>
  </parent>

  <artifactId>elephant-bird-pig</artifactId>
  <name>Elephant Bird Pig</name>
  <description>Pig utilities.</description>

  <dependencies>
    <dependency>
      <groupId>com.twitter.elephantbird</groupId>
      <artifactId>elephant-bird-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.pig</groupId>
      <artifactId>pig</artifactId>
      <classifier>${apache.pig.classifier}</classifier>
    </dependency>
    <dependency>
      <groupId>org.antlr</groupId>
      <artifactId>antlr</artifactId>
    </dependency>
    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
    </dependency>
    <dependency>
     <groupId>org.codehaus.jackson</groupId>
      <artifactId>jackson-mapper-asl</artifactId>
    </dependency>

    <!-- log4j required for tests-->
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>

      <!-- thrift -->
      <plugin>
        <groupId>org.apache.thrift.tools</groupId>
        <artifactId>maven-thrift-plugin</artifactId>
        <executions>
          <execution>
            <id>thrift-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- add generated sources -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-test-source</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/generated-test-sources/thrift</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- increase memory -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>-Djava.library.path=${test.library.path} -Xmx1024m</argLine>
        </configuration>
      </plugin>

      <!-- need this for the mahout tests -->
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>
</project>
