<?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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.nvidia</groupId>
  <artifactId>rapids-4-spark-tools_2.12</artifactId>
  <name>RAPIDS Accelerator for Apache Spark tools</name>
  <version>23.02.0</version>
  <description>RAPIDS Accelerator for Apache Spark tools</description>
  <url>http://github.com/NVIDIA/spark-rapids-tools</url>
  <developers>
    <developer>
      <id>revans2</id>
      <name>Robert Evans</name>
      <email>roberte@nvidia.com</email>
      <roles>
        <role>Committer</role>
      </roles>
      <timezone>-6</timezone>
    </developer>
    <developer>
      <id>tgravescs</id>
      <name>Thomas Graves</name>
      <email>tgraves@nvidia.com</email>
      <roles>
        <role>Committer</role>
      </roles>
      <timezone>-6</timezone>
    </developer>
    <developer>
      <id>jlowe</id>
      <name>Jason Lowe</name>
      <email>jlowe@nvidia.com</email>
      <roles>
        <role>Committer</role>
      </roles>
      <timezone>-6</timezone>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:https://github.com/NVIDIA/spark-rapids-tools.git</connection>
    <developerConnection>scm:git:git@github.com:NVIDIA/spark-rapids-tools.git</developerConnection>
    <url>https://github.com/NVIDIA/spark-rapids-tools</url>
  </scm>
  <build>
    <resources>
      <resource>
        <directory>${project.basedir}/src/main/resources</directory>
      </resource>
      <resource>
        <targetPath>META-INF</targetPath>
        <directory>${project.basedir}/..</directory>
        <includes>
          <include>LICENSE</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest-maven-plugin</artifactId>
        <version>${scalatest-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>test</id>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
          <junitxml>.</junitxml>
          <filereports>scala-test-output.txt</filereports>
          <stderr />
          <systemProperties>
            <java.awt.headless>true</java.awt.headless>
            <java.io.tmpdir>${project.build.directory}/tmp</java.io.tmpdir>
            <spark.ui.enabled>false</spark.ui.enabled>
            <spark.ui.showConsoleProgress>false</spark.ui.showConsoleProgress>
            <spark.unsafe.exceptionOnMemoryLeak>true</spark.unsafe.exceptionOnMemoryLeak>
          </systemProperties>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <version>3.2.4</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <minimizeJar>true</minimizeJar>
              <artifactSet>
                <includes>
                  <include>org.rogach:scallop_${scala.binary.version}</include>
                </includes>
              </artifactSet>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.MF</exclude>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
              <transformers>
                <transformer>
                  <mainClass>com.nvidia.spark.rapids.tool.profiling.ProfileMain</mainClass>
                </transformer>
              </transformers>
              <createDependencyReducedPom>true</createDependencyReducedPom>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <version>0.13</version>
      </plugin>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <version>${scala.plugin.version}</version>
        <executions>
          <execution>
            <id>eclipse-add-source</id>
            <goals>
              <goal>add-source</goal>
            </goals>
          </execution>
          <execution>
            <id>scala-compile-first</id>
            <phase>process-resources</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>scala-test-compile-first</id>
            <phase>process-test-resources</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
          <execution>
            <id>attach-scaladocs</id>
            <phase>compile</phase>
            <goals>
              <goal>doc-jar</goal>
            </goals>
            <configuration>
              <args>
                <arg>-doc-external-doc:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar#https://docs.oracle.com/javase/8/docs/api/index.html</arg>
                <arg>-doc-external-doc:${settings.localRepository}/org/scala-lang/scala-library/${scala.version}/scala-library-${scala.version}.jar#https://scala-lang.org/api/${scala.version}/</arg>
                <arg>-doc-external-doc:${settings.localRepository}/org/apache/spark/spark-sql_2.12/${spark.version}/spark-sql_2.12-${spark.version}/.jar#https://spark.apache.org/docs/${spark.version}/api/scala/index.html</arg>
              </args>
              <scalaVersion>${scala.version}</scalaVersion>
              <checkMultipleScalaVersions>true</checkMultipleScalaVersions>
              <failOnMultipleScalaVersions>true</failOnMultipleScalaVersions>
              <jvmArgs>
                <jvmArg>-Xms1024m</jvmArg>
                <jvmArg>-Xmx1024m</jvmArg>
              </jvmArgs>
              <addJavacArgs>-Xlint:all,-serial,-path,-try</addJavacArgs>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <scalaVersion>${scala.version}</scalaVersion>
          <checkMultipleScalaVersions>true</checkMultipleScalaVersions>
          <failOnMultipleScalaVersions>true</failOnMultipleScalaVersions>
          <recompileMode>incremental</recompileMode>
          <args>
            <arg>-unchecked</arg>
            <arg>-deprecation</arg>
            <arg>-feature</arg>
            <arg>-explaintypes</arg>
            <arg>-Yno-adapted-args</arg>
            <arg>-Ywarn-unused:imports</arg>
            <arg>-Xlint:missing-interpolator</arg>
          </args>
          <jvmArgs>
            <jvmArg>-Xms1024m</jvmArg>
            <jvmArg>-Xmx1024m</jvmArg>
          </jvmArgs>
          <addJavacArgs>${scala.javac.args}</addJavacArgs>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>3.0.0</version>
        <executions>
          <execution>
            <id>download-ui-dependencies</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <property />
                <property />
                <property />
                <property />
                <property />
                <property />
                <property />
                <property />
                <property />
                <property />
                <property />
                <property />
                <property />
                <property />
                <property />
                <ant />
              </target>
            </configuration>
          </execution>
          <execution>
            <id>copy-notice</id>
            <phase>process-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <copy>
                  <fileset>
                    <include />
                  </fileset>
                  <mapper />
                </copy>
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>${maven.clean.plugin.version}</version>
        <executions>
          <execution>
            <id>clean-qual-ui-dependencies</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
            <configuration>
              <filesets>
                <fileset>
                  <directory>${ui.resources.relative}</directory>
                  <includes>
                    <include>${ui.resources.external.folder}/</include>
                  </includes>
                </fileset>
              </filesets>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven.jar.plugin.version}</version>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-source</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
      <version>2.12.15</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-sql_2.12</artifactId>
      <version>3.1.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.spark</groupId>
      <artifactId>spark-core_2.12</artifactId>
      <version>3.1.1</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-client</artifactId>
      <version>3.3.4</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-aws</artifactId>
      <version>3.3.4</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_2.12</artifactId>
      <version>3.0.5</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>scalactic_2.12</artifactId>
          <groupId>org.scalactic</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
      <version>1.33</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  <properties>
    <spark.test.version>${spark311.version}</spark.test.version>
    <snakeyaml.version>1.33</snakeyaml.version>
    <spark.version>${spark311.version}</spark.version>
    <spark311.version>3.1.1</spark311.version>
    <scala.version>2.12.15</scala.version>
    <ui.resources.dir>${project.basedir}/${ui.resources.relative}</ui.resources.dir>
    <scalatest-maven-plugin.version>2.0.2</scalatest-maven-plugin.version>
    <scala.javac.args>-Xlint:all,-serial,-path,-try</scala.javac.args>
    <scala.binary.version>2.12</scala.binary.version>
    <hadoop.version>3.3.4</hadoop.version>
    <spark.version.classifier>spark311</spark.version.classifier>
    <target.classifier>spark311</target.classifier>
    <ui.resources.relative>src/main/resources/ui</ui.resources.relative>
    <scala.plugin.version>4.3.0</scala.plugin.version>
    <scalatest.version>3.0.5</scalatest.version>
    <ui.resources.external.folder>assets</ui.resources.external.folder>
    <ui.cache.dir>${project.build.directory}/ui-dependencies-cache</ui.cache.dir>
    <scallop.version>3.5.1</scallop.version>
    <maven.jar.plugin.version>3.2.0</maven.jar.plugin.version>
    <maven.clean.plugin.version>3.1.0</maven.clean.plugin.version>
  </properties>
</project>
