<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->
<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>com.gojek.parquet</groupId>
    <artifactId>parquet</artifactId>
    <relativePath>../pom.xml</relativePath>
    <version>1.11.9</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>

  <artifactId>parquet-protobuf</artifactId>
  <packaging>jar</packaging>

  <properties>
    <elephant-bird.version>4.4</elephant-bird.version>
    <protobuf.version>3.5.1</protobuf.version>
    <truth-proto-extension.version>1.0</truth-proto-extension.version>
  </properties>


  <name>Apache Parquet Protobuf</name>
  <url>https://parquet.apache.org</url>

  <dependencies>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.truth.extensions</groupId>
      <artifactId>truth-proto-extension</artifactId>
      <version>${truth-proto-extension.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
      <version>${protobuf.version}</version>
    </dependency>
    <dependency>
      <groupId>com.gojek.parquet</groupId>
      <artifactId>parquet-common</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.gojek.parquet</groupId>
      <artifactId>parquet-column</artifactId>
      <version>${project.version}</version>
      </dependency>
    <dependency>
      <groupId>com.gojek.parquet</groupId>
      <artifactId>parquet-hadoop</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.twitter.elephantbird</groupId>
      <artifactId>elephant-bird-core</artifactId>
      <version>${elephant-bird.version}</version>
      <exclusions>
        <!-- hadoop-lzo is not required for parquet build/tests and there are issues downloading it -->
        <exclusion>
          <groupId>com.hadoop.gplcompression</groupId>
          <artifactId>hadoop-lzo</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>${hadoop.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${slf4j.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <!-- com.twitter.elephantbird brings in an older version of libthrift so we force to use our own one -->
      <dependency>
        <groupId>org.apache.thrift</groupId>
        <artifactId>libthrift</artifactId>
        <version>${format.thrift.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <developers>
    <developer>
      <id>lukasnalezenec</id>
      <name>Lukas Nalezenec</name>
    </developer>
  </developers>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven-jar-plugin.version}</version>
        <configuration>
          <archive>
            <manifestEntries>
              <git-SHA-1>${buildNumber}</git-SHA-1>
            </manifestEntries>
          </archive>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.os72</groupId>
        <artifactId>protoc-jar-maven-plugin</artifactId>
        <version>3.8.0</version>
        <executions>
          <execution>
            <id>generate-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <includeMavenTypes>direct</includeMavenTypes>
              <protocVersion>${protobuf.version}</protocVersion>
              <addSources>test</addSources>
              <addProtoSources>all</addProtoSources>
              <outputDirectory>${project.build.directory}/generated-test-sources/java</outputDirectory>
              <inputDirectories>
                <include>src/test/resources</include>
              </inputDirectories>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

</project>
