<?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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>rapids-4-spark-parent</artifactId>
    <groupId>com.nvidia</groupId>
    <version>0.2.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.nvidia</groupId>
  <artifactId>rapids-4-spark_2.12</artifactId>
  <name>RAPIDS Accelerator for Apache Spark Distribution</name>
  <version>0.2.0</version>
  <description>Creates the distribution package of the RAPIDS plugin for Apache Spark</description>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <filters>
                <filter>
                  <artifact>com.nvidia:rapids-4-spark_2.12</artifact>
                  <includes>
                    <include>META-INF/**</include>
                  </includes>
                  <excludes>
                    <exclude>META-INF/services/**</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <transformers>
            <transformer />
          </transformers>
          <shadedArtifactAttached>false</shadedArtifactAttached>
          <createDependencyReducedPom>true</createDependencyReducedPom>
          <relocations>
            <relocation>
              <pattern>org.apache.orc.</pattern>
              <shadedPattern>${rapids.shade.package}.orc.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.hadoop.hive.</pattern>
              <shadedPattern>${rapids.shade.package}.hadoop.hive.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.hive.</pattern>
              <shadedPattern>${rapids.shade.package}.hive.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>io.airlift.compress.</pattern>
              <shadedPattern>${rapids.shade.package}.io.airlift.compress.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.commons.codec.</pattern>
              <shadedPattern>${rapids.shade.package}.org.apache.commons.codec.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>org.apache.commons.lang.</pattern>
              <shadedPattern>${rapids.shade.package}.org.apache.commons.lang.</shadedPattern>
            </relocation>
            <relocation>
              <pattern>com.google</pattern>
              <shadedPattern>${rapids.shade.package}.com.google</shadedPattern>
            </relocation>
          </relocations>
        </configuration>
      </plugin>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>update_config</id>
            <phase>verify</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <launchers>
            <launcher>
              <id>update_rapids_config</id>
              <mainClass>com.nvidia.spark.rapids.RapidsConf</mainClass>
              <args>
                <arg>${project.basedir}/../docs/configs.md</arg>
              </args>
            </launcher>
          </launchers>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>dependency-reduced-pom.xml</exclude>
            <exclude>*pom.xml.asc</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-sql_2.12</artifactId>
      <version>3.0.0</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <artifactId>univocity-parsers</artifactId>
          <groupId>com.univocity</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-sketch_2.12</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-core_2.12</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-catalyst_2.12</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spark-tags_2.12</artifactId>
          <groupId>org.apache.spark</groupId>
        </exclusion>
        <exclusion>
          <artifactId>parquet-column</artifactId>
          <groupId>org.apache.parquet</groupId>
        </exclusion>
        <exclusion>
          <artifactId>parquet-hadoop</artifactId>
          <groupId>org.apache.parquet</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jackson-databind</artifactId>
          <groupId>com.fasterxml.jackson.core</groupId>
        </exclusion>
        <exclusion>
          <artifactId>xbean-asm7-shaded</artifactId>
          <groupId>org.apache.xbean</groupId>
        </exclusion>
        <exclusion>
          <artifactId>unused</artifactId>
          <groupId>org.spark-project.spark</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
