<!--

    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>
  <groupId>org.alluxio</groupId>
  <artifactId>alluxio-parent</artifactId>
  <version>2.2.2</version>
  <packaging>pom</packaging>
  <name>Alluxio Parent</name>
  <description>Parent POM of Alluxio project: a Memory-Speed Virtual Distributed Storage System</description>
  <url>https://www.alluxio.io/</url>
  <licenses>
    <license>
      <name>Apache License</name>
      <url>https://github.com/alluxio/alluxio/blob/master/LICENSE</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <connection>scm:git:git@github.com:alluxio/alluxio.git</connection>
    <developerConnection>scm:git:git@github.com:alluxio/alluxio.git</developerConnection>
    <url>scm:git:git@github.com:alluxio/alluxio.git</url>
    <tag>v2.2.2</tag>
  </scm>
  <developers>
    <developer>
      <id>haoyuan</id>
      <name>Haoyuan Li</name>
      <email>haoyuan@alluxio.com</email>
      <url>http://www.cs.berkeley.edu/~haoyuan</url>
      <organization>Alluxio Open Foundation</organization>
      <organizationUrl>https://alluxio.io/</organizationUrl>
    </developer>
  </developers>
  <issueManagement>
    <system>jira</system>
    <url>https://alluxio.atlassian.net</url>
  </issueManagement>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <repositories>
    <repository>
      <id>central</id>
      <!-- This should be at top, it makes maven try the central repo first and then others and hence faster dep resolution -->
      <name>Maven Repository</name>
      <url>https://repo1.maven.org/maven2</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>apache-repo</id>
      <name>Apache Repository</name>
      <url>https://repository.apache.org/content/repositories/releases</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>cloudera-repo</id>
      <name>Cloudera Repository</name>
      <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <!-- for Pivotal's distribution -->
      <id>spring-releases</id>
      <name>Spring Release Repository</name>
      <url>https://repo.spring.io/libs-release</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>HDPReleases</id>
      <name>HDP Releases</name>
      <url>https://repo.hortonworks.com/content/repositories/releases/</url>
      <layout>default</layout>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
        <checksumPolicy>warn</checksumPolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
        <updatePolicy>never</updatePolicy>
        <checksumPolicy>fail</checksumPolicy>
      </snapshots>
    </repository>
    <repository>
      <id>alluxio.artifacts</id>
      <url>http://alluxio.artifacts.s3-website-us-east-1.amazonaws.com/release</url>
    </repository>
  </repositories>

  <properties>
    <argLine />
    <apache.curator.version>4.2.0</apache.curator.version>
    <aws.amazonaws.version>1.11.215</aws.amazonaws.version>
    <build.path>build</build.path>
    <copycat.version>1.2.15</copycat.version>
    <cxf.version>2.7.0</cxf.version>
    <glusterfs-hadoop.version>2.3.13</glusterfs-hadoop.version>
    <gmetric4j.version>1.0.7</gmetric4j.version>
    <grpc.version>1.27.0</grpc.version>
    <netty.version>4.1.42.Final</netty.version>
    <hadoop.version>2.7.3</hadoop.version>
    <hadoop-openstack.version>2.6.0</hadoop-openstack.version>
    <jacoco.version>0.8.5</jacoco.version>
    <java.version>1.8</java.version>
    <jersey.version>2.22</jersey.version>
    <jetty.version>9.2.16.v20160414</jetty.version>
    <junit.version>4.12</junit.version>
    <log4j.version>1.2.17</log4j.version>
    <maven.version>3.3.9</maven.version>
    <metrics.version>3.1.2</metrics.version>
    <oshi.version>4.2.0</oshi.version>
    <powermock.version>1.6.2</powermock.version>
    <prometheus.version>0.3.0</prometheus.version>
    <guava.version>27.0.1-jre</guava.version>
    <parquet.version>1.10.0</parquet.version>
    <protobuf.version>3.11.0</protobuf.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <slf4j.version>1.7.2</slf4j.version>
    <jackson.version>2.10.1</jackson.version>
    <surefire.forkCount>2</surefire.forkCount>
    <surefire.useSystemClassLoader>true</surefire.useSystemClassLoader>
    <surefire.excludesFile>slow-tests</surefire.excludesFile>
    <surefire.rerunFailingTestsCount>1</surefire.rerunFailingTestsCount>
    <test.output.redirect>true</test.output.redirect>
    <update.check.enabled>false</update.check.enabled>
    <findbugs.skip>false</findbugs.skip>
  </properties>

  <modules>
    <module>assembly</module>
    <module>core</module>
    <module>examples</module>
    <module>integration</module>
    <module>logserver</module>
    <module>minicluster</module>
    <module>job</module>
    <module>shaded</module>
    <module>shell</module>
    <module>table</module>
    <module>tests</module>
    <module>underfs</module>
    <module>webui</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <!-- Compile scope -->
      <dependency>
        <groupId>com.aliyun.oss</groupId>
        <artifactId>aliyun-sdk-oss</artifactId>
        <version>3.7.0</version>
      </dependency>
      <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-core</artifactId>
        <version>${aws.amazonaws.version}</version>
      </dependency>
      <dependency>
        <groupId>com.amazonaws</groupId>
        <artifactId>aws-java-sdk-s3</artifactId>
        <version>${aws.amazonaws.version}</version>
      </dependency>
      <dependency>
        <groupId>com.beust</groupId>
        <artifactId>jcommander</artifactId>
        <version>1.48</version>
      </dependency>
      <dependency>
        <groupId>com.esotericsoftware</groupId>
        <artifactId>kryo</artifactId>
        <version>4.0.2</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-xml</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.serceman</groupId>
        <artifactId>jnr-fuse</artifactId>
        <version>0.5.1</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <!-- using older version to match dependency version from Hadoop -->
        <groupId>com.google.inject</groupId>
        <artifactId>guice</artifactId>
        <version>3.0</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>${protobuf.version}</version>
      </dependency>
      <dependency>
        <groupId>com.jamesmurty.utils</groupId>
        <artifactId>java-xmlbuilder</artifactId>
        <version>0.4</version>
      </dependency>
      <dependency>
        <groupId>commons-cli</groupId>
        <artifactId>commons-cli</artifactId>
        <version>1.3.1</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.10</version>
      </dependency>
      <dependency>
        <groupId>commons-httpclient</groupId>
        <artifactId>commons-httpclient</artifactId>
        <version>3.1</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.4</version>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>2.6</version>
      </dependency>
      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.1.1</version>
      </dependency>
      <dependency>
        <groupId>info.ganglia.gmetric4j</groupId>
        <artifactId>gmetric4j</artifactId>
        <version>${gmetric4j.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-core</artifactId>
        <version>${metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-ganglia</artifactId>
        <version>${metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-graphite</artifactId>
        <version>${metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-json</artifactId>
        <version>${metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-jvm</artifactId>
        <version>${metrics.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-core</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-netty</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-protobuf</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-stub</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>${netty.version}</version>
      </dependency>
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-transport-native-unix-common</artifactId>
        <version>${netty.version}</version>
      </dependency>
      <dependency>
        <groupId>io.prometheus</groupId>
        <artifactId>simpleclient</artifactId>
        <version>${prometheus.version}</version>
      </dependency>
      <dependency>
        <groupId>io.prometheus</groupId>
        <artifactId>simpleclient_servlet</artifactId>
        <version>${prometheus.version}</version>
      </dependency>
      <dependency>
        <groupId>io.prometheus</groupId>
        <artifactId>simpleclient_dropwizard</artifactId>
        <version>${prometheus.version}</version>
      </dependency>
      <dependency>
        <groupId>io.swagger</groupId>
        <artifactId>swagger-annotations</artifactId>
        <version>1.5.22</version>
      </dependency>
      <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>javax.ws.rs-api</artifactId>
        <version>2.0.1</version>
      </dependency>
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>3.1.0</version>
      </dependency>
      <dependency>
        <groupId>jline</groupId>
        <artifactId>jline</artifactId>
        <version>2.14.6</version>
      </dependency>
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
      </dependency>
      <dependency>
        <groupId>net.java.dev.jets3t</groupId>
        <artifactId>jets3t</artifactId>
        <version>0.8.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>1.16.1</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.4</version>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-client</artifactId>
        <version>${apache.curator.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-framework</artifactId>
        <version>${apache.curator.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-recipes</artifactId>
        <version>${apache.curator.version}</version>
      </dependency>
      <!-- We do not use dependent management for hadoop-common, hadoop-hdfs, as it is unavailable in hadoop-1 -->
      <!-- We do not use dependent management for hadoop-core, as it is unavailable in hadoop-2.x -->
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-client</artifactId>
        <version>${hadoop.version}</version>
        <exclusions>
          <!-- Excluded to avoid implementation conflict with org.glassfish.jersey.core:jersey-server -->
          <exclusion>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-core</artifactId>
          </exclusion>
          <!-- Excluded to avoid implementation conflict with org.glassfish.jersey.core:jersey-server -->
          <exclusion>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
          </exclusion>
          <!-- Excluded to avoid implementation conflict with javax.servlet:servlet-api -->
          <exclusion>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-minicluster</artifactId>
        <version>${hadoop.version}</version>
        <exclusions>
          <!-- Excluded to avoid implementation conflict with javax.ws.rs:javax.ws.rs-api -->
          <exclusion>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-core</artifactId>
          </exclusion>
          <!-- Excluded to avoid implementation conflict with org.glassfish.jersey.core:jersey-server -->
          <exclusion>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
          </exclusion>
          <!-- Excluded to avoid implementation conflict with javax.servlet:javax.servlet-api -->
          <exclusion>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
          </exclusion>
          <!-- Excluded to avoid issues with the web UI -->
          <exclusion>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
          </exclusion>
          <!-- Excluded to avoid issues with the web UI -->
          <exclusion>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jsp-2.1</artifactId>
          </exclusion>
          <!-- Excluded to avoid issues with the web UI -->
          <exclusion>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jsp-api-2.1</artifactId>
          </exclusion>
          <!-- Excluded to avoid issues with the web UI -->
          <exclusion>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>servlet-api</artifactId>
          </exclusion>
          <!-- Excluded to avoid issues with the web UI -->
          <exclusion>
            <groupId>tomcat</groupId>
            <artifactId>jasper-runtime</artifactId>
          </exclusion>
          <!-- Excluded to avoid issues with the web UI -->
          <exclusion>
            <groupId>tomcat</groupId>
            <artifactId>jasper-compiler</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-yarn-client</artifactId>
        <version>${hadoop.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.3</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>4.4.6</version>
      </dependency>
      <dependency>
        <groupId>org.apache.parquet</groupId>
        <artifactId>parquet-avro</artifactId>
        <version>${parquet.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.parquet</groupId>
        <artifactId>parquet-cli</artifactId>
        <version>${parquet.version}</version>
      </dependency>
      <dependency>
        <groupId>io.atomix.copycat.alluxio</groupId>
        <artifactId>copycat-server</artifactId>
        <version>${copycat.version}</version>
      </dependency>
      <dependency>
        <groupId>io.atomix.copycat.alluxio</groupId>
        <artifactId>copycat-client</artifactId>
        <version>${copycat.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.mesos</groupId>
        <artifactId>mesos</artifactId>
        <version>0.23.0</version>
        <exclusions>
          <!-- Excluded to avoid conflict with the version Alluxio uses. -->
          <exclusion>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>maven-jspc-plugin</artifactId>
        <version>2.0.8</version>
      </dependency>
      <dependency>
        <groupId>org.apache.zookeeper</groupId>
        <artifactId>zookeeper</artifactId>
        <version>3.5.5</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>apache-jstl</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-annotations</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-server</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-servlet</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-util</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-webapp</artifactId>
        <version>${jetty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.containers</groupId>
        <artifactId>jersey-container-servlet-core</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.core</groupId>
        <artifactId>jersey-server</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish.jersey.media</groupId>
        <artifactId>jersey-media-json-jackson</artifactId>
        <version>${jersey.version}</version>
      </dependency>
      <dependency>
        <groupId>org.gluster</groupId>
        <artifactId>glusterfs-hadoop</artifactId>
        <version>${glusterfs-hadoop.version}</version>
        <exclusions>
          <!-- Excluded to avoid implementation conflict with javax.ws.rs:javax.ws.rs-api -->
          <exclusion>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-core</artifactId>
          </exclusion>
          <!-- Excluded to avoid implementation conflict with org.glassfish.jersey.core:jersey-server -->
          <exclusion>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
          </exclusion>
          <!-- Excluded to avoid implementation conflict with javax.servlet:javax.servlet-api -->
          <exclusion>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.javaswift</groupId>
        <artifactId>joss</artifactId>
        <version>0.9.10</version>
      </dependency>
      <dependency>
        <groupId>org.reflections</groupId>
        <artifactId>reflections</artifactId>
        <version>0.9.10</version>
      </dependency>
      <dependency>
        <groupId>org.rocksdb</groupId>
        <artifactId>rocksdbjni</artifactId>
        <version>5.15.10</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
      </dependency>

      <!-- Test scope -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava-testlib</artifactId>
        <version>${guava.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>io.grpc</groupId>
        <artifactId>grpc-testing</artifactId>
        <version>${grpc.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-test</artifactId>
        <version>${apache.curator.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-test</artifactId>
        <version>${hadoop.version}</version>
        <scope>test</scope>
      </dependency>
      <!-- TODO(andrew): Update to a non-rc version before final Alluxio release -->
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest</artifactId>
        <version>2.1-rc4</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.10.19</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-api-mockito</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-classloading-xstream</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-core</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-module-junit4</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-module-junit4-rule</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.powermock</groupId>
        <artifactId>powermock-reflect</artifactId>
        <version>${powermock.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- Provided scope -->
      <!--
         Dependency for FindBugs Plugin annotations.
         This enables @ThreadSafe @ThreadNotSafe @SuppressFBWarnings.
         This library is a super set of com.google.code.findbugs:jsr305
         Note that this package can be unnecessary for runtime, and the
         'provided' scope makes it available for compilation and test,
         but not be packaged into the jar.
       -->
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>annotations</artifactId>
        <version>3.0.1</version>
        <scope>provided</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <!-- Dependencies to add to all projects. -->
  <dependencies>
    <!-- Dependencies in the compile scope. -->
    <!-- FindBugs and concurrency annotations. -->
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>annotations</artifactId>
    </dependency>
    <!-- System logging. -->
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
    </dependency>

    <!-- Dependencies in the test scope. -->
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava-testlib</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-classloading-xstream</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4-rule</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-reflect</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.coderplus.maven.plugins</groupId>
          <artifactId>copy-rename-maven-plugin</artifactId>
          <version>1.0</version>
        </plugin>
        <plugin>
          <groupId>com.igormaznitsa</groupId>
          <artifactId>jcp</artifactId>
          <version>6.1.2</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.17</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.8.1</version>
          <configuration>
            <source>${java.version}</source>
            <target>${java.version}</target>
            <encoding>UTF-8</encoding>
            <maxmem>1024m</maxmem>
            <compilerArgs>
              <arg>-Xlint:none</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.4</version>
          <configuration>
            <excludes>
              <exclude>**/log4j.properties</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <!-- Needs to be 2.4.2 or later to prevent MSHADE-148 -->
          <version>3.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.19.1</version>
          <configuration>
            <skipTests>true</skipTests>
            <argLine>@{argLine} -Djava.net.preferIPv4Stack=true</argLine>
            <excludesFile>${build.path}/surefire/${surefire.excludesFile}</excludesFile>
            <forkCount>${surefire.forkCount}</forkCount>
            <rerunFailingTestsCount>${surefire.rerunFailingTestsCount}</rerunFailingTestsCount>
            <redirectTestOutputToFile>${test.output.redirect}</redirectTestOutputToFile>
            <reuseForks>false</reuseForks>
            <runOrder>alphabetical</runOrder>
            <systemPropertyVariables>
              <alluxio.test.mode>true</alluxio.test.mode>
              <jacoco-agent.append>true</jacoco-agent.append>
              <jacoco-agent.destfile>${build.path}/../target/jacoco-combined.exec</jacoco-agent.destfile>
            </systemPropertyVariables>
            <useSystemClassLoader>${surefire.useSystemClassLoader}</useSystemClassLoader>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.10</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <version>1.4</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.4.0</version>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>3.1.12.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>properties-maven-plugin</artifactId>
          <version>1.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>templating-maven-plugin</artifactId>
          <version>1.0.0</version>
        </plugin>
        <!-- REST Documentation plugin -->
        <plugin>
          <groupId>com.github.kongchen</groupId>
          <artifactId>swagger-maven-plugin</artifactId>
          <version>3.1.1</version>
          <executions>
            <execution>
              <phase>compile</phase>
              <goals>
                <goal>generate</goal>
              </goals>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>javax.xml.bind</groupId>
              <artifactId>jaxb-api</artifactId>
              <version>2.3.1</version>
            </dependency>
          </dependencies>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <skipAssembly>true</skipAssembly>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Javadoc -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <additionalparam>-Xdoclint:none</additionalparam>
        </configuration>
        <executions>
          <execution>
            <id>aggregate</id>
            <goals>
              <goal>aggregate</goal>
            </goals>
          </execution>
          <execution>
            <id>attach-javadoc</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Enforce versions -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <!-- hardcode the version here because maven failed to pick up the dependency-managed version of maven-enforcer-plugin -->
        <version>1.4</version>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>${maven.version}</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>${java.version}</version>
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- SpotBugs -->
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <configuration>
          <excludeFilterFile>${build.path}/findbugs/findbugs-exclude.xml</excludeFilterFile>
          <!--
              Enables analysis which takes more memory but finds more bugs.
              If you run out of memory, changes the value of the effort element
              to 'Low'.
            -->
          <effort>Max</effort>
          <skip>${findbugs.skip}</skip>
          <failOnError>true</failOnError>
          <threshold>Low</threshold>
          <spotbugsXmlOutput>true</spotbugsXmlOutput>
          <xmlOutput>true</xmlOutput>
        </configuration>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Checkstyle -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>${build.path}/checkstyle/alluxio_checks.xml</configLocation>
          <suppressionsLocation>${build.path}/checkstyle/suppressions.xml</suppressionsLocation>
          <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
          <!-- Ensure generated source files are not style-checked -->
          <sourceDirectories>
            <sourceDirectory>${project.build.sourceDirectory}</sourceDirectory>
            <sourceDirectory>${project.build.testSourceDirectory}</sourceDirectory>
          </sourceDirectories>
          <includeTestSourceDirectory>true</includeTestSourceDirectory>
          <excludes>**/org/apache/jsp/**,**/alluxio/concurrent/jsr/**</excludes>
          <encoding>UTF-8</encoding>
          <consoleOutput>true</consoleOutput>
          <failsOnError>true</failsOnError>
          <linkXRef>false</linkXRef>
        </configuration>
        <executions>
          <execution>
            <id>checkstyle</id>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- License Plugin -->
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <header>${build.path}/license/HEADER.txt</header>
          <failIfMissing>true</failIfMissing>
          <aggregate>false</aggregate>
          <excludes>

            <!-- Code Exclusions -->
            <exclude>**/src/main/java/alluxio/concurrent/jsr/**</exclude>
            <exclude>**/src/main/resources/*</exclude>
            <exclude>**/src/proto/**</exclude>
            <exclude>**/src/deb/**/*</exclude>
            <exclude>**/src/test/resources/**</exclude>
            <exclude>**/dev/scripts/vendor/**</exclude>
            <exclude>**/dev/scripts/src/vendor/**</exclude>
            <exclude>**/vagrant/**/*</exclude>
            <exclude>**/\?/.java/**/*</exclude>

            <!-- Build and Packaging Exclusions -->
            <exclude>webui/node_modules/*</exclude>
            <exclude>build/**/*</exclude>
            <exclude>conf/alluxio-env.sh</exclude>
            <exclude>conf/alluxio-site.properties</exclude>
            <exclude>conf/masters</exclude>
            <exclude>conf/tiered_identity.sh</exclude>
            <exclude>conf/workers</exclude>
            <exclude>dev/scripts/tarballs/**/*</exclude>
            <exclude>dev/scripts/workdir/**/*</exclude>
            <exclude>generated/**</exclude>
            <exclude>**/.checkstyle</exclude>
            <exclude>**/src/main/assembly/*</exclude>
            <exclude>**/.idea/**</exclude>
            <exclude>webui/**/.nvmrc</exclude>
            <exclude>webui/**/*.svg</exclude>
            <exclude>webui/**/.env*</exclude>
            <exclude>webui/**/node/**</exclude>
            <exclude>webui/**/node_modules/**</exclude>
            <exclude>webui/**/src/**/*.css</exclude>
            <exclude>webui/**/build/**</exclude>

            <!-- Documentation Exclusions -->
            <exclude>docs/**/*</exclude>
            <exclude>LICENSE</exclude>
            <exclude>NOTICE</exclude>

            <!-- Default Local File System Exclusions -->
            <exclude>logs/*</exclude>
            <exclude>journal/**/*</exclude>
            <exclude>underFSStorage/**/*</exclude>
          </excludes>
          <mapping>
            <alluxio>SCRIPT_STYLE</alluxio>
            <go>SLASHSTAR_STYLE</go>
            <java>SLASHSTAR_STYLE</java>
            <tsx>SLASHSTAR_STYLE</tsx>
            <scss>SLASHSTAR_STYLE</scss>
            <properties.template>SCRIPT_STYLE</properties.template>
            <sh.template>SCRIPT_STYLE</sh.template>
            <workers>SCRIPT_STYLE</workers>
            <xml.template>XML_STYLE</xml.template>
          </mapping>
          <useDefaultMapping>true</useDefaultMapping>
          <strictCheck>true</strictCheck>
        </configuration>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Prevent Windows line endings -->
      <plugin>
        <artifactId>exec-maven-plugin</artifactId>
        <groupId>org.codehaus.mojo</groupId>
        <inherited>false</inherited>
        <executions>
          <execution>
            <id>Check that there are no Windows line endings</id>
            <phase>compile</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>${build.path}/style/check_no_windows_line_endings.sh</executable>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <show>public</show>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>runAllTests</id>
      <properties>
        <surefire.excludesFile>no-excludes</surefire.excludesFile>
      </properties>
    </profile>

    <profile>
      <id>contractTest</id>
      <properties>
        <hadoop.version>2.6.5</hadoop.version>
      </properties>
    </profile>

    <profile>
      <id>hadoop-1</id>
      <properties>
        <hadoop.version>1.0.4</hadoop.version>
      </properties>
    </profile>

    <profile>
      <id>hadoop-2</id>
      <properties>
        <hadoop.version>2.7.3</hadoop.version>
      </properties>
    </profile>

    <profile>
      <id>hadoop-3</id>
      <properties>
        <hadoop.version>3.0.0</hadoop.version>
      </properties>
    </profile>

    <profile>
      <id>mesos</id>
      <modules>
        <module>integration/mesos</module>
      </modules>
    </profile>

    <!-- Requires hadoop.version to be 2.4.0 or later -->
    <profile>
      <id>yarn</id>
      <modules>
        <module>integration/yarn</module>
      </modules>
    </profile>

    <profile>
      <id>java11</id>
      <activation>
        <jdk>11</jdk>
      </activation>
      <properties>
        <java.version>11</java.version>
      </properties>
      <dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>1.3.2</version>
          </dependency>
        </dependencies>
      </dependencyManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <source>8</source>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- profile that Alluxio developers should use -->
    <profile>
      <id>developer</id>
      <modules>
        <module>integration/yarn</module>
        <module>integration/mesos</module>
      </modules>
      <properties>
        <hadoop.version>2.6.0</hadoop.version>
      </properties>
    </profile>

    <profile>
      <id>generateDocs</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>exec-maven-plugin</artifactId>
            <groupId>org.codehaus.mojo</groupId>
            <inherited>false</inherited>
            <executions>
              <execution>
                <id>Generate documentation</id>
                <phase>compile</phase>
                <goals>
                  <goal>exec</goal>
                </goals>
                <configuration>
                  <executable>jekyll</executable>
                  <arguments>
                    <argument>build</argument>
                    <argument>--source</argument>
                    <argument>docs</argument>
                    <argument>--destination</argument>
                    <argument>docs/_site</argument>
                  </arguments>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jacoco</id>
      <dependencies>
        <dependency>
          <!-- to use instrument, jacoco must be on the classpath -->
          <groupId>org.jacoco</groupId>
          <artifactId>org.jacoco.agent</artifactId>
          <classifier>runtime</classifier>
          <version>0.8.5</version>
          <scope>test</scope>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco.version}</version>
            <configuration>
              <!--
                  Append all coverage data into a single .exec file, so the reports include
                  integration test results. The report generation should happen in a separate,
                  later stage, so the coverage data is complete with the results of all the tests
                  in the project.
               -->
              <append>true</append>
              <destFile>${build.path}/../target/jacoco-combined.exec</destFile>
            </configuration>
            <executions>
              <execution>
                <!-- offline instrumentation is required, for jacoco to work with powermock tests -->
                <id>jacoco-unit-instrument-classes</id>
                <goals>
                  <goal>instrument</goal>
                </goals>
              </execution>
              <execution>
                <!-- offline instrumentation is required, for jacoco to work with powermock tests -->
                <id>jacoco-unit-restore-instrumented-classes</id>
                <phase>test</phase>
                <goals>
                  <goal>restore-instrumented-classes</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jacocoReport</id>
      <!--
          This profile depends on the generated coverage data from the jacoco profile (test phase).
          This should be run as a separate step, since the generated coverage data should include
          the results from all the tests in the project.
       -->
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco.version}</version>
            <executions>
              <execution>
                <id>jacoco-coverage-report</id>
                <goals>
                  <goal>report</goal>
                </goals>
                <configuration>
                  <dataFile>${build.path}/../target/jacoco-combined.exec</dataFile>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
