<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.hive</groupId>
    <artifactId>hive</artifactId>
    <version>3.1.3.0-eep-900</version>
  </parent>

  <groupId>org.apache.hive.conftool</groupId>
  <artifactId>mapr-conf-tool</artifactId>
  <name>MapR Configuration Tool</name>

  <properties>
    <hive.path.to.root>..</hive.path.to.root>
    <packaging.minimizeJar>false</packaging.minimizeJar>
  </properties>

  <dependencies>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
      <version>${commons-cli.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-common</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hive.hcatalog</groupId>
      <artifactId>hive-webhcat</artifactId>
      <version>${project.version}</version>
    </dependency>
    <!-- For Tests -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>${hamcrest.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.hive</groupId>
      <artifactId>hive-beeline</artifactId>
      <version>${project.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <configuration>
        <environmentVariables>
          <MAPR_HOME>${test.tmp.dir}/opt/mapr</MAPR_HOME>
          <HIVE_HOME>${test.tmp.dir}/opt/mapr/hive/hive-3.1.3</HIVE_HOME>
          <MAPR_USER>${user.name}</MAPR_USER>
          <MAPR_GROUP>${user.name}</MAPR_GROUP>
          <BASEMAPR>${test.tmp.dir}/opt/mapr</BASEMAPR>
          <MAPR_TICKETFILE_LOCATION>${test.tmp.dir}/opt/mapr/conf/mapruserticket</MAPR_TICKETFILE_LOCATION>
          <HIVE_BIN>${basedir}/${hive.path.to.root}/bin</HIVE_BIN>
          <LOG_FILE>conftool.log</LOG_FILE>
          <HADOOP_CLASSPATH>${test.conf.dir}:${basedir}/${hive.path.to.root}/conf:${basedir}/target/classes:${test.hive.hadoop.classpath}</HADOOP_CLASSPATH>
        </environmentVariables>
        <systemPropertyVariables>
          <mapr.home.dir>${test.tmp.dir}/opt/mapr</mapr.home.dir>
          <java.security.auth.login.config>${basedir}/${hive.path.to.root}/data/conf/mapr.login.conf</java.security.auth.login.config>
          <mapr.user>${user.name}</mapr.user>
        </systemPropertyVariables>
      </configuration>
      </plugin>
    </plugins>
  </build>
</project>
