<?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">

  <groupId>io.druid.extensions.contrib</groupId>
  <artifactId>druid-thrift-extensions</artifactId>
  <name>druid-thrift-extensions</name>
  <description>druid-thrift-extensions</description>

  <parent>
    <artifactId>druid</artifactId>
    <groupId>io.druid</groupId>
    <version>0.12.3</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <properties>
    <thrift.version>0.9.3</thrift.version>
    <elephantbird.version>4.8</elephantbird.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.thrift</groupId>
      <artifactId>libthrift</artifactId>
      <version>${thrift.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>commons-logging</artifactId>
          <groupId>commons-logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>httpclient</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
        <exclusion>
          <artifactId>httpcore</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>io.druid</groupId>
      <artifactId>druid-indexing-hadoop</artifactId>
      <version>${project.parent.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.twitter.elephantbird</groupId>
      <artifactId>elephant-bird-core</artifactId>
      <version>${elephantbird.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.thrift</groupId>
          <artifactId>libthrift</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.twitter.elephantbird</groupId>
      <artifactId>elephant-bird-hadoop-compat</artifactId>
      <version>${elephantbird.version}</version>
    </dependency>
    <dependency>
      <groupId>com.twitter</groupId>
      <artifactId>scrooge-core_2.11</artifactId>
      <version>4.10.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.twitter</groupId>
        <artifactId>scrooge-maven-plugin</artifactId>
        <version>4.11.0</version>
        <configuration>
          <language>java</language>
        </configuration>
        <executions>
          <execution>
            <id>thrift-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>strict</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <compilerArgs>
                <!-- Thrift-generated classes miss @Override, that is not easy to fix -->
                <arg>-Xep:MissingOverride:WARN</arg>
              </compilerArgs>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
