<?xml version="1.0" encoding="UTF-8"?>
<!--

    The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
    (the "License"). You may not use this work except in compliance with the License, which is
    available at www.apache.org/licenses/LICENSE-2.0

    This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
    either express or implied, as more fully set forth in the License.

    See the NOTICE file distributed with this work for information regarding copyright ownership.

-->
<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>
    <artifactId>alluxio-integration</artifactId>
    <groupId>org.alluxio</groupId>
    <version>2.8.0-1</version>
  </parent>
  <packaging>pom</packaging>
  <name>Alluxio Integration - Tools</name>
  <artifactId>alluxio-integration-tools</artifactId>

  <properties>
    <!-- The following paths need to be defined here as well as in the parent pom so that mvn can -->
    <!-- run properly from sub-project directories -->
    <build.path>${project.parent.parent.basedir}/build</build.path>
    <ufs.hadoop.version>3.3.1</ufs.hadoop.version>
    <failIfNoTests>false</failIfNoTests>
  </properties>

  <modules>
    <module>hms</module>
    <module>validation</module>
  </modules>

  <dependencies>
    <!-- Internal dependencies -->
    <dependency>
      <groupId>org.alluxio</groupId>
      <artifactId>alluxio-core-common</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>

  </dependencies>

  <profiles>
    <!-- Profile to build this UFS module connecting to hdfs 1 -->
    <profile>
      <!-- Decouple hadoop profiles: hadoop-1 to indicate north bound and ufs-hadoop-1 to indicate the south bound -->
      <id>ufs-hadoop-1</id>
      <dependencies>
        <dependency>
          <groupId>org.alluxio</groupId>
          <artifactId>alluxio-shaded-hadoop</artifactId>
          <version>${ufs.hadoop.version}</version>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>com.igormaznitsa</groupId>
            <artifactId>jcp</artifactId>
            <configuration>
              <globalVars>
                <property>
                  <name>HADOOP1</name>
                </property>
              </globalVars>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Profile to build this UFS module connecting to hdfs 2 -->
    <profile>
      <!-- Decouple hadoop profiles: hadoop-2 to indicate north bound and ufs-hadoop-2 to indicate the south bound -->
      <id>ufs-hadoop-2</id>
      <dependencies>
        <dependency>
          <groupId>org.alluxio</groupId>
          <artifactId>alluxio-shaded-hadoop</artifactId>
          <version>${ufs.hadoop.version}</version>
        </dependency>
      </dependencies>
    </profile>

    <!-- Profile to build this UFS module connecting to hdfs 3, this is the default profile -->
    <profile>
      <id>ufs-hadoop-3</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.alluxio</groupId>
          <artifactId>alluxio-shaded-hadoop</artifactId>
          <version>${ufs.hadoop.version}</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
</project>
