<?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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.trino</groupId>
        <artifactId>trino-root</artifactId>
        <version>480</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>trino-hive-formats</artifactId>
    <name>${project.artifactId}</name>
    <description>Trino - Hive Formats</description>

    <properties>
        <air.compiler.fail-warnings>true</air.compiler.fail-warnings>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.esri.geometry</groupId>
            <artifactId>esri-geometry-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_annotations</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

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

        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>aircompressor-v3</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>concurrent</artifactId>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>log</artifactId>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>slice</artifactId>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>units</artifactId>
        </dependency>

        <dependency>
            <groupId>io.trino</groupId>
            <artifactId>trino-cache</artifactId>
        </dependency>

        <dependency>
            <groupId>io.trino</groupId>
            <artifactId>trino-filesystem</artifactId>
        </dependency>

        <dependency>
            <groupId>io.trino</groupId>
            <artifactId>trino-plugin-toolkit</artifactId>
        </dependency>

        <dependency>
            <groupId>io.trino</groupId>
            <artifactId>trino-spi</artifactId>
        </dependency>

        <dependency>
            <groupId>jakarta.annotation</groupId>
            <artifactId>jakarta.annotation-api</artifactId>
        </dependency>

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

        <dependency>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
        </dependency>

        <dependency>
            <groupId>org.gaul</groupId>
            <artifactId>modernizer-maven-annotations</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <!-- Add LZ4 dependency to replace excluded org.lz4:lz4-java -->
            <groupId>at.yawk.lz4</groupId>
            <artifactId>lz4-java</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- TODO: remove after making Avro use Aircompressor -->
        <dependency>
            <groupId>com.github.luben</groupId>
            <artifactId>zstd-jni</artifactId>
            <version>1.5.7-7</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>log-manager</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- TODO: remove after making Avro use Aircompressor -->
        <dependency>
            <groupId>org.xerial.snappy</groupId>
            <artifactId>snappy-java</artifactId>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>junit-extensions</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>testing</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.starburst.openjson</groupId>
            <artifactId>openjson</artifactId>
            <version>1.8-e.12</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.starburst.openx.data</groupId>
            <artifactId>json-serde</artifactId>
            <version>1.3.9-e.12</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.hive</groupId>
                    <artifactId>hive-exec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hive</groupId>
                    <artifactId>hive-serde</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>io.trino</groupId>
            <artifactId>trino-main</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.trino</groupId>
            <artifactId>trino-main</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.trino</groupId>
            <artifactId>trino-testing-services</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.trino.hadoop</groupId>
            <artifactId>hadoop-apache</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.trino.hive</groupId>
            <artifactId>hive-apache</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>it.unimi.dsi</groupId>
            <artifactId>fastutil</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.github.os72</groupId>
                    <artifactId>protoc-jar-maven-plugin</artifactId>
                    <version>3.11.4</version>
                    <configuration>
                        <protocArtifact>com.google.protobuf:protoc:${dep.protobuf.version}</protocArtifact>
                        <protocVersion>${dep.protobuf.version}</protocVersion>
                        <addSources>none</addSources>
                        <inputDirectories>
                            <include>src/test/resources/protobuf/sources</include>
                        </inputDirectories>
                        <outputDirectory>target/generated-test-sources/</outputDirectory>
                        <outputTargets>
                            <outputTarget>
                                <type>java</type>
                                <addSources>none</addSources>
                                <outputDirectory>target/generated-test-sources/</outputDirectory>
                            </outputTarget>
                            <outputTarget>
                                <type>descriptor</type>
                                <addSources>none</addSources>
                                <outputDirectory>target/test-classes/protobuf/descriptors</outputDirectory>
                            </outputTarget>
                        </outputTargets>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.github.os72</groupId>
                <artifactId>protoc-jar-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-test-sources</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <phase>generate-test-sources</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-test-sources</id>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <phase>generate-test-sources</phase>
                        <configuration>
                            <sources>
                                <source>${basedir}/target/generated-test-sources</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
