<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<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.apache.phoenix</groupId>
  <artifactId>phoenix</artifactId>
  <version>5.1.2</version>
  <packaging>pom</packaging>
  <name>Apache Phoenix</name>
  <description>A SQL layer over HBase</description>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments/>
    </license>
  </licenses>

  <organization>
    <name>Apache Software Foundation</name>
    <url>https://www.apache.org</url>
  </organization>

  <modules>
    <module>phoenix-hbase-compat-2.4.1</module>
    <module>phoenix-hbase-compat-2.4.0</module>
    <module>phoenix-hbase-compat-2.3.0</module>
    <module>phoenix-hbase-compat-2.2.5</module>
    <module>phoenix-hbase-compat-2.1.6</module>
    <module>phoenix-core</module>
    <module>phoenix-pherf</module>
    <module>phoenix-client-parent</module>
    <module>phoenix-client-parent/phoenix-client</module>
    <!-- phoenix-client-embedded is added in profile "embedded" -->
    <module>phoenix-server</module>
    <module>phoenix-assembly</module>
    <module>phoenix-tools</module>
    <module>phoenix-tracing-webapp</module>
  </modules>

  <repositories>
    <repository>
      <id>apache release</id>
      <url>https://repository.apache.org/content/repositories/releases/</url>
    </repository>
  </repositories>

  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>23</version>
  </parent>

  <scm>
    <connection>scm:git:https://git-wip-us.apache.org/repos/asf/phoenix.git</connection>
    <url>https://git-wip-us.apache.org/repos/asf/phoenix.git</url>
    <developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/phoenix.git</developerConnection>
  </scm>

  <properties>

    <!-- Hadoop and Hbase-thirdparty version -->
    <!-- These are expected to be overridden to conform to cluster versions
    along with hbase.version (defined in profiles) -->
    <hadoop.version>3.1.4</hadoop.version>
    <hbase.thirdparty.version>2.2.1</hbase.thirdparty.version>

    <phoenix.thirdparty.version>1.1.0</phoenix.thirdparty.version>
    <hbase.suffix>hbase-${hbase.profile}</hbase.suffix>

    <!-- This is used by the release script only -->
    <hbase.profile.list>2.1 2.2 2.3 2.4.0 2.4</hbase.profile.list>
    <!-- The default hbase versions to build with (override with hbase.version) -->
    <hbase-2.1.runtime.version>2.1.10</hbase-2.1.runtime.version>
    <hbase-2.2.runtime.version>2.2.6</hbase-2.2.runtime.version>
    <hbase-2.3.runtime.version>2.3.5</hbase-2.3.runtime.version>
    <hbase-2.4.0.runtime.version>2.4.0</hbase-2.4.0.runtime.version>
    <hbase-2.4.runtime.version>2.4.2</hbase-2.4.runtime.version>

    <!-- General Properties -->
    <antlr-input.dir>src/main/antlr3</antlr-input.dir>
    <antlr-output.dir>target/generated-sources/antlr3</antlr-output.dir>
    <test.output.tofile>true</test.output.tofile>
    <top.dir>${project.basedir}</top.dir>

    <!-- Dependency versions -->
    <jackson.version>2.10.3</jackson.version>
    <antlr.version>3.5.2</antlr.version>
    <log4j.version>1.2.17</log4j.version>
    <disruptor.version>3.3.6</disruptor.version>
    <slf4j.version>1.7.25</slf4j.version>
    <!-- com.google repo will be used except on Aarch64 platform. -->
    <protobuf.group>com.google.protobuf</protobuf.group>
    <protobuf-java.version>2.5.0</protobuf-java.version>
    <protoc.version>2.5.0</protoc.version>
    <commons-io.version>2.5</commons-io.version>
    <commons-lang.version>3.8</commons-lang.version>
    <commons-csv.version>1.0</commons-csv.version>
    <sqlline.version>1.9.0</sqlline.version>
    <commons-configuration2.version>2.1.1</commons-configuration2.version>
    <findbugs-annotations.version>1.3.9-1</findbugs-annotations.version>
    <jcip-annotations.version>1.0-1</jcip-annotations.version>
    <jsr305.version>2.0.1</jsr305.version>
    <snappy.version>0.3</snappy.version>
    <commons-codec.version>1.7</commons-codec.version>
    <htrace.version>3.1.0-incubating</htrace.version>
    <collections.version>3.2.2</collections.version>
    <jodatime.version>2.10.5</jodatime.version>
    <joni.version>2.1.31</joni.version>
    <tephra.version>0.16.1</tephra.version>
    <omid.version>1.0.2</omid.version>
    <stream.version>2.9.5</stream.version>
    <i18n-util.version>1.0.4</i18n-util.version>
    <guice.version>4.0</guice.version>
    <zookeeper.version>3.4.14</zookeeper.version>
    <curator.version>4.0.0</curator.version>
    <jcodings.version>1.0.55</jcodings.version>
    <thrift.version>0.9.3-1</thrift.version>
    <!-- Test Dependencies -->
    <mockito.version>1.10.19</mockito.version>
    <junit.version>4.13</junit.version>
    <hamcrest.version>1.3</hamcrest.version>

    <!-- Plugin versions -->
    <maven-eclipse-plugin.version>2.9</maven-eclipse-plugin.version>
    <maven-build-helper-plugin.version>1.9.1</maven-build-helper-plugin.version>
    <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>
    <restrict-imports.enforcer.version>1.1.0</restrict-imports.enforcer.version>
    <maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>
    <maven-antlr-eclipse-plugin.version>${antlr.version}</maven-antlr-eclipse-plugin.version>
    <maven-project-info-reports-plugin.version>3.1.1</maven-project-info-reports-plugin.version>
    <!-- Override property in ASF parent -->
    <surefire.version>2.22.2</surefire.version>
    <spotbugs-maven-plugin.version>4.1.3</spotbugs-maven-plugin.version>
    <spotbugs.version>4.1.3</spotbugs.version>
    <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>

    <!-- Plugin options -->
    <numForkedUT>8</numForkedUT>
    <numForkedIT>7</numForkedIT>
    <it.failIfNoSpecifiedTests>false</it.failIfNoSpecifiedTests>
    <surefire.failIfNoSpecifiedTests>false</surefire.failIfNoSpecifiedTests>
    <!-- Empty argument when code coverage is deactivated -->
    <jacocoArgLine></jacocoArgLine>

    <!-- Set default encoding so multi-byte tests work correctly on the Mac -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <!-- JaCoCo thresholds which we can override in each sub-module if required -->
    <jacoco.instruction.coverage.percentage>0.700</jacoco.instruction.coverage.percentage>
    <jacoco.branch.coverage.percentage>0.600</jacoco.branch.coverage.percentage>

    <maven-owasp-plugin.version>5.3.2</maven-owasp-plugin.version>
    <protobuf.plugin.version>0.6.1</protobuf.plugin.version>
    <os.maven.version>1.5.0.Final</os.maven.version>
  </properties>

  <build>
    <extensions>
      <extension>
        <groupId>kr.motd.maven</groupId>
        <artifactId>os-maven-plugin</artifactId>
        <version>${os.maven.version}</version>
      </extension>
    </extensions>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${maven-project-info-reports-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <source>1.8</source>
            <target>1.8</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.antlr</groupId>
          <artifactId>antlr3-maven-plugin</artifactId>
          <version>${maven-antlr-eclipse-plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>com.github.searls</groupId>
          <artifactId>jasmine-maven-plugin</artifactId>
          <version>2.2</version>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${spotbugs-maven-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>com.github.spotbugs</groupId>
              <artifactId>spotbugs</artifactId>
              <version>${spotbugs.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <effort>Max</effort>
            <maxHeap>2048</maxHeap>
          </configuration>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings 
          only. It has no influence on the Maven build itself. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.antlr</groupId>
                    <artifactId>antlr3-maven-plugin</artifactId>
                    <versionRange>[3.5,)</versionRange>
                    <goals>
                      <goal>antlr</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <version>${maven-eclipse-plugin.version}</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
        </plugin>
        <plugin>
          <groupId>org.apache.rat</groupId>
          <artifactId>apache-rat-plugin</artifactId>
          <!-- Avoid defining exclusions in pluginManagement as they are global.
               We already inherit some from the ASF parent pom. -->
        </plugin>
        <!-- We put slow-running tests into src/it and run them during the
            integration-test phase using the failsafe plugin. This way
            developers can run unit tests conveniently from the IDE or via
            "mvn package" from the command line without triggering time
            consuming integration tests. -->
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${maven-build-helper-plugin.version}</version>
          <executions>
            <execution>
              <id>add-test-source</id>
              <phase>validate</phase>
              <goals>
                <goal>add-test-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>${basedir}/src/it/java</source>
                </sources>
              </configuration>
            </execution>
            <execution>
              <id>add-test-resource</id>
              <phase>validate</phase>
              <goals>
                <goal>add-test-resource</goal>
              </goals>
              <configuration>
                <resources>
                  <resource>
                    <directory>${basedir}/src/it/resources</directory>
                  </resource>
                </resources>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <!-- Common settings for all executions -->
          <configuration>
            <encoding>UTF-8</encoding>
            <forkCount>${numForkedIT}</forkCount>
            <runOrder>alphabetical</runOrder>
            <redirectTestOutputToFile>${test.output.tofile}</redirectTestOutputToFile>
            <shutdown>kill</shutdown>
            <testSourceDirectory>${basedir}/src/it/java</testSourceDirectory>
            <trimStackTrace>false</trimStackTrace>
          </configuration>
          <executions>
            <execution>
              <id>ParallelStatsEnabledTest</id>
              <configuration>
                <reuseForks>true</reuseForks>
                <argLine>@{jacocoArgLine} -Xmx2000m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 </argLine>
                <groups>org.apache.phoenix.end2end.ParallelStatsEnabledTest</groups>
              </configuration>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
            <execution>
              <id>ParallelStatsDisabledTest</id>
              <configuration>
                <reuseForks>true</reuseForks>
                <argLine>@{jacocoArgLine} -Xmx3000m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 </argLine>
                <groups>org.apache.phoenix.end2end.ParallelStatsDisabledTest</groups>
              </configuration>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
            <execution>
              <id>NeedTheirOwnClusterTests</id>
              <configuration>
                 <reuseForks>false</reuseForks>
                 <argLine>@{jacocoArgLine} -enableassertions -Xmx2000m -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine>
                 <groups>org.apache.phoenix.end2end.NeedsOwnMiniClusterTest</groups>
              </configuration>
              <goals>
                 <goal>integration-test</goal>
                 <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <configuration>
              <ignoredUnusedDeclaredDependencies>
                <ignoredUnusedDeclaredDependency>
                  org.apache.omid:omid-hbase-shims-hbase2.x
                </ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>
                  org.apache.omid:omid-hbase-common-hbase2.x:jar
                </ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>
                  org.apache.omid:omid-hbase-commit-table-hbase2.x
                </ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>
                  org.apache.omid:omid-timestamp-storage-hbase2.x
                </ignoredUnusedDeclaredDependency>
                <ignoredUnusedDeclaredDependency>
                  org.slf4j:slf4j-log4j12
                </ignoredUnusedDeclaredDependency>
              </ignoredUnusedDeclaredDependencies>
              <ignoredUsedUndeclaredDependencies>
                <ignoredUsedUndeclaredDependency>
                  dnsjava:dnsjava
                </ignoredUsedUndeclaredDependency>
              </ignoredUsedUndeclaredDependencies>
            </configuration>
          <executions>
            <execution>
              <id>create-mrapp-generated-classpath</id>
              <phase>generate-test-resources</phase>
              <goals>
                <goal>build-classpath</goal>
              </goals>
              <configuration>
                <outputFile>${project.build.directory}/classes/mrapp-generated-classpath
                </outputFile>
                <ignoredUnusedDeclaredDependencies>
                    org.apache.omid:*hbase2.x
                </ignoredUnusedDeclaredDependencies>
              </configuration>
            </execution>
            <execution>
              <id>enforce-dependencies</id>
              <goals>
                <goal>analyze-only</goal>
              </goals>
              <configuration>
                <failOnWarning>true</failOnWarning>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>${maven-shade-plugin.version}</version>
        </plugin>
        <plugin>
          <!-- Allows us to get the apache-ds bundle artifacts -->
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.6.0</version>
        </plugin>
        <plugin>
          <groupId>org.xolstice.maven.plugins</groupId>
          <artifactId>protobuf-maven-plugin</artifactId>
          <version>${protobuf.plugin.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${maven-enforcer-plugin.version}</version>
          <dependencies>
            <dependency>
              <groupId>de.skuzzle.enforcer</groupId>
              <artifactId>restrict-imports-enforcer-rule</artifactId>
              <version>${restrict-imports.enforcer.version}</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>banned-illegal-imports</id>
              <phase>process-sources</phase>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
                    <includeTestCode>true</includeTestCode>
                    <reason>Use SLF4j for logging</reason>
                    <bannedImports>
                      <bannedImport>org.apache.commons.logging.Log</bannedImport>
                      <bannedImport>org.apache.commons.logging.LogFactory</bannedImport>
                    </bannedImports>
                  </restrictImports>
                  <restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
                    <includeTestCode>true</includeTestCode>
                    <reason>Use shaded version in phoenix-thirdparty</reason>
                    <bannedImports>
                      <bannedImport>com.google.common.**</bannedImport>
                    </bannedImports>
                  </restrictImports>
                  <restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
                    <includeTestCode>true</includeTestCode>
                    <reason>Use shaded version in phoenix-thirdparty</reason>
                    <bannedImports>
                      <bannedImport>org.apache.commons.cli.**</bannedImport>
                    </bannedImports>
                  </restrictImports>
                  <restrictImports implementation="de.skuzzle.enforcer.restrictimports.rule.RestrictImports">
                    <includeTestCode>true</includeTestCode>
                    <reason>Use commons lang 3</reason>
                    <bannedImports>
                      <bannedImport>org.apache.commons.lang.**</bannedImport>
                    </bannedImports>
                  </restrictImports>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.1.0</version>
        <executions>
          <execution>
            <id>validate</id>
            <phase>validate</phase>
            <configuration>
              <skip>true</skip>
              <configLocation>${top.dir}/src/main/config/checkstyle/checker.xml</configLocation>
              <suppressionsLocation>${top.dir}/src/main/config/checkstyle/suppressions.xml</suppressionsLocation>
              <consoleOutput>true</consoleOutput>
              <headerLocation>${top.dir}/src/main/config/checkstyle/header.txt</headerLocation>
              <failOnViolation><!--true-->false</failOnViolation>
              <includeTestSourceDirectory><!--true-->false</includeTestSourceDirectory>
            </configuration>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <quiet>true</quiet>
          <links>
            <link>https://hbase.apache.org/apidocs/</link>
          </links>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <!-- TODO turn back on javadocs - disabled now for testing -->
              <!-- <goal>jar</goal> -->
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkCount>${numForkedUT}</forkCount>
          <reuseForks>true</reuseForks>
          <argLine>@{jacocoArgLine} -enableassertions -Xmx2250m -XX:MaxPermSize=128m
            -Djava.security.egd=file:/dev/./urandom "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/</argLine>
          <redirectTestOutputToFile>${test.output.tofile}</redirectTestOutputToFile>
          <shutdown>kill</shutdown>
          <trimStackTrace>false</trimStackTrace>
        </configuration>
      </plugin>
      <!-- All projects create a test jar -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <phase>prepare-package
            </phase>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
        <configuration>
          <excludes>
            <!-- Header on changelog isn't normal -->
            <exclude>CHANGES</exclude>
            <!-- create-release scripts -->
            <exclude>dev/create-release/README.txt</exclude>
            <exclude>dev/create-release/vote.tmpl</exclude>
            <!-- IDE configuration -->
            <exclude>dev/phoenix.importorder</exclude>
            <!-- Release L&N -->
            <exclude>dev/release_files/LICENSE</exclude>
            <exclude>dev/release_files/NOTICE</exclude>
            <!-- Exclude data files for examples -->
            <exclude>docs/*.csv</exclude>
            <exclude>examples/*.csv</exclude>
            <!-- Exclude SQL files from rat. Sqlline 1.1.9 doesn't work with
                 comments on the first line of a file. -->
            <exclude>examples/*.sql</exclude>
            <!-- precommit? -->
            <exclude>**/patchprocess/**</exclude>
            <!-- Argparse is bundled to work around system Python version
                 issues, compatibile with ALv2 -->
            <exclude>bin/argparse-1.4.0/argparse.py</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <!-- Allows us to get the apache-ds bundle artifacts -->
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <inherited>true</inherited>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <!-- Intra-project dependencies -->
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-core</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-client-hbase-2.1</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-client-hbase-2.2</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-client-hbase-2.3</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-client-hbase-2.4.0</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-client-hbase-2.4</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-server-hbase-2.1</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-server-hbase-2.2</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-server-hbase-2.3</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-server-hbase-2.4.0</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-server-hbase-2.4</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-pherf</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-tools</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-tracing-webapp</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix.thirdparty</groupId>
        <artifactId>phoenix-shaded-guava</artifactId>
        <version>${phoenix.thirdparty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-hbase-compat-2.1.6</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-hbase-compat-2.2.5</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-hbase-compat-2.3.0</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-hbase-compat-2.4.0</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-hbase-compat-2.4.1</artifactId>
        <version>${project.version}</version>
      </dependency>
      <!-- Intra-project test dependencies -->
      <dependency>
        <groupId>org.apache.phoenix</groupId>
        <artifactId>phoenix-core</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>

      <!-- Hadoop Dependencies -->
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-common</artifactId>
        <version>${hadoop.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.htrace</groupId>
            <artifactId>htrace-core4</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-mapreduce-client-core</artifactId>
        <version>${hadoop.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-hdfs-client</artifactId>
        <version>${hadoop.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-yarn-api</artifactId>
        <version>${hadoop.version}</version>
      </dependency>

      <!-- These are referenced indirectly -->
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-client</artifactId>
        <version>${hadoop.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-distcp</artifactId>
        <version>${hadoop.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-hdfs</artifactId>
        <version>${hadoop.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-auth</artifactId>
        <exclusions>
          <exclusion>
            <groupId>net.minidev</groupId>
            <artifactId>json-smart</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.minidev</groupId>
            <artifactId>accessors-smart</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
          </exclusion>
        </exclusions>
        <version>${hadoop.version}</version>
      </dependency>
      <!-- Only for shading in phoenix-server - remove ? -->
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-annotations</artifactId>
        <version>${hadoop.version}</version>
      </dependency>

      <!-- Hadoop test Dependencies -->
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-minicluster</artifactId>
        <version>${hadoop.version}</version>
        <scope>test</scope>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-minikdc</artifactId>
        <version>${hadoop.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-hdfs</artifactId>
        <type>test-jar</type>
        <classifier>tests</classifier>
        <version>${hadoop.version}</version>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>org.apache.htrace</groupId>
            <artifactId>htrace-core4</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- These are to fix Hadoop minicluster dependency issues -->
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-mapreduce-client-app</artifactId>
        <version>${hadoop.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
        <version>${hadoop.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- HBase dependencies -->
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-annotations</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-protocol</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-protocol-shaded</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-common</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-metrics-api</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-metrics</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-client</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-endpoint</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-server</artifactId>
        <version>${hbase.version}</version>
        <exclusions>
          <exclusion>
            <groupId>xom</groupId>
            <artifactId>xom</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-mapreduce</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-hadoop-compat</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-hadoop2-compat</artifactId>
        <version>${hbase.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-zookeeper</artifactId>
        <version>${hbase.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.hbase.thirdparty</groupId>
        <artifactId>hbase-shaded-miscellaneous</artifactId>
        <version>${hbase.thirdparty.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase.thirdparty</groupId>
        <artifactId>hbase-shaded-protobuf</artifactId>
        <version>${hbase.thirdparty.version}</version>
      </dependency>

      <!-- HBase test dependencies -->
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-it</artifactId>
        <version>${hbase.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
        <exclusions>
          <exclusion>
            <groupId>org.jruby</groupId>
            <artifactId>jruby-complete</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-common</artifactId>
        <version>${hbase.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-server</artifactId>
        <version>${hbase.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>

      <!-- Transaction dependencies -->
      <!-- Tephra -->
      <dependency>
        <groupId>org.apache.tephra</groupId>
        <artifactId>tephra-api</artifactId>
        <version>${tephra.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.tephra</groupId>
        <artifactId>tephra-core-shaded</artifactId>
        <version>${tephra.version}</version>
        <exclusions>
          <exclusion>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
          </exclusion>
          <exclusion>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
          </exclusion>
          <exclusion>
            <groupId>it.unimi.dsi</groupId>
            <artifactId>fastutil</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.zookeeper</groupId>
            <artifactId>zookeeper</artifactId>
          </exclusion>
          <exclusion>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-core</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.tephra</groupId>
        <artifactId>tephra-hbase-compat-${tephra.hbase.compat.version}</artifactId>
        <classifier>shaded</classifier>
        <version>${tephra.version}</version>
        <!-- use tephra-core-shaded instead -->
        <exclusions>
          <exclusion>
            <groupId>org.apache.tephra</groupId>
            <artifactId>tephra-core</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- Omid -->
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-hbase-common-hbase2.x</artifactId>
        <version>${omid.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-shims-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-common-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-hbase-client-hbase2.x</artifactId>
        <version>${omid.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-commit-table-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-common-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-client-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-shims-hbase1.x</artifactId>
         </exclusion>
         <exclusion>
           <groupId>org.testng</groupId>
           <artifactId>testng</artifactId>
         </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-hbase-coprocessor-hbase2.x</artifactId>
        <version>${omid.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-commit-table-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
          <artifactId>omid-hbase-client-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-shims-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-tso-server-hbase2.x</artifactId>
        <version>${omid.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-common-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-commit-table-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-timestamp-storage-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-daemon</groupId>
            <artifactId>commons-daemon</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-hbase-shims-hbase2.x</artifactId>
        <version>${omid.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-tso-server-hbase2.x</artifactId>
        <version>${omid.version}</version>
        <type>test-jar</type>
        <exclusions>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-common-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-commit-table-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-timestamp-storage-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-daemon</groupId>
            <artifactId>commons-daemon</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-timestamp-storage-hbase2.x</artifactId>
        <version>${omid.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-shims-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-common-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-hbase-commit-table-hbase2.x</artifactId>
        <version>${omid.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-common-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.apache.omid</groupId>
            <artifactId>omid-hbase-shims-hbase1.x</artifactId>
          </exclusion>
          <exclusion>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
          </exclusion>
          <exclusion>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-transaction-client</artifactId>
        <version>${omid.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-commit-table</artifactId>
        <version>${omid.version}</version>
        <exclusions>
          <exclusion>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.omid</groupId>
        <artifactId>omid-common</artifactId>
        <version>${omid.version}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-framework</artifactId>
        <version>${curator.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-client</artifactId>
        <version>${curator.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-recipes</artifactId>
        <version>${curator.version}</version>
      </dependency>

      <!-- Fix omid dependency scopes -->
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-testing-util</artifactId>
        <version>${hbase.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- Other dependencies -->
      <dependency>
        <groupId>org.apache.zookeeper</groupId>
        <artifactId>zookeeper</artifactId>
        <version>${zookeeper.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.zookeeper</groupId>
        <artifactId>zookeeper-jute</artifactId>
        <version>${zookeeper.version}</version>
      </dependency>
      <dependency>
        <groupId>org.antlr</groupId>
        <artifactId>antlr-runtime</artifactId>
        <version>${antlr.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject</groupId>
        <artifactId>guice</artifactId>
        <version>${guice.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.stephenc.findbugs</groupId>
        <artifactId>findbugs-annotations</artifactId>
        <version>${findbugs-annotations.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.stephenc.jcip</groupId>
        <artifactId>jcip-annotations</artifactId>
        <version>${jcip-annotations.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>${jsr305.version}</version>
      </dependency>
      <dependency>
        <groupId>org.iq80.snappy</groupId>
        <artifactId>snappy</artifactId>
        <version>${snappy.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-annotations</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.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>${protobuf-java.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.htrace</groupId>
        <artifactId>htrace-core</artifactId>
        <version>${htrace.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>${commons-codec.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>${collections.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-csv</artifactId>
        <version>${commons-csv.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-configuration2</artifactId>
        <version>${commons-configuration2.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.phoenix.thirdparty</groupId>
        <artifactId>phoenix-shaded-commons-cli</artifactId>
        <version>${phoenix.thirdparty.version}</version>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>${jodatime.version}</version>
      </dependency>
      <dependency>
        <groupId>com.clearspring.analytics</groupId>
        <artifactId>stream</artifactId>
        <version>${stream.version}</version>
      </dependency>
      <dependency>
        <groupId>com.salesforce.i18n</groupId>
        <artifactId>i18n-util</artifactId>
        <version>${i18n-util.version}</version>
      </dependency>
      <dependency>
        <groupId>com.lmax</groupId>
        <artifactId>disruptor</artifactId>
        <version>${disruptor.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jruby.joni</groupId>
        <artifactId>joni</artifactId>
        <version>${joni.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jruby.jcodings</groupId>
        <artifactId>jcodings</artifactId>
        <version>${jcodings.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.thrift</groupId>
        <artifactId>libthrift</artifactId>
        <version>${thrift.version}</version>
        <exclusions>
           <exclusion>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- Other test dependencies -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.hamcrest</groupId>
        <artifactId>hamcrest-core</artifactId>
        <version>${hamcrest.version}</version>
        <scope>test</scope>
      </dependency>

       <!-- Runtime dependencies -->
       <dependency>
         <groupId>log4j</groupId>
         <artifactId>log4j</artifactId>
         <version>${log4j.version}</version>
         <scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
        <scope>runtime</scope>
      </dependency>
      <dependency>
        <groupId>sqlline</groupId>
        <artifactId>sqlline</artifactId>
        <version>${sqlline.version}</version>
        <scope>runtime</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <!-- this profile should be activated for release builds -->
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.rat</groupId>
            <artifactId>apache-rat-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>exclude-tephra</id>
      <activation>
        <property>
          <name>without.tephra</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <classpathDependencyExcludes>
                org.apache.tephra:tephra-api,org.apache.tephra:tephra-core,org.apache.thrift:libthrift
              </classpathDependencyExcludes>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <classpathDependencyExcludes>
                org.apache.tephra:tephra-api,org.apache.tephra:tephra-core,org.apache.thrift:libthrift
              </classpathDependencyExcludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- See BUILDING.md for profile selection-->
    <!-- The dependencies should be defined only in phoenix-core
    ,but maven doesn't seem to support that -->
    <profile>
      <!-- must be identical to phoenix-hbase-compat-2.4.1 profile -->
      <!-- PHOENIX-5993 This won't work with the public HBase artifacts -->
      <id>phoenix-hbase-compat-2.4.1-default</id>
      <activation>
        <property>
          <name>!hbase.profile</name>
        </property>
      </activation>
      <properties>
        <hbase.profile>2.4</hbase.profile>
        <hbase.compat.version>2.4.1</hbase.compat.version>
        <hbase.version>${hbase-2.4.runtime.version}</hbase.version>
        <hbase.thirdparty.version>3.4.1</hbase.thirdparty.version>
        <zookeeper.version>3.5.7</zookeeper.version>
        <tephra.hbase.compat.version>2.4</tephra.hbase.compat.version>
      </properties>
    </profile>
    <profile>
      <!-- PHOENIX-5993 may work with the public HBase artifacts, as the test don't trip over
      anything but it should be rebuilt like 2.2+ -->
      <id>phoenix-hbase-compat-2.1.6</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
          <name>hbase.profile</name>
          <value>2.1</value>
        </property>
      </activation>
      <properties>
        <hbase.profile>2.1</hbase.profile>
        <hbase.compat.version>2.1.6</hbase.compat.version>
        <hbase.version>${hbase-2.1.runtime.version}</hbase.version>
        <hadoop.version>3.0.3</hadoop.version>
        <tephra.hbase.compat.version>2.1</tephra.hbase.compat.version>
      </properties>
    </profile>
    <profile>
      <!-- PHOENIX-5993 This won't work with the public HBase artifacts -->
      <id>phoenix-hbase-compat-2.2.5</id>
      <activation>
        <property>
          <name>hbase.profile</name>
          <value>2.2</value>
        </property>
      </activation>
      <properties>
        <hbase.profile>2.2</hbase.profile>
        <hbase.compat.version>2.2.5</hbase.compat.version>
        <hbase.version>${hbase-2.2.runtime.version}</hbase.version>
        <hadoop.version>3.1.3</hadoop.version>
        <tephra.hbase.compat.version>2.2</tephra.hbase.compat.version>
      </properties>
    </profile>
    <profile>
      <!-- PHOENIX-5993 This won't work with the public HBase artifacts -->
      <id>phoenix-hbase-compat-2.3.0</id>
      <activation>
        <property>
          <name>hbase.profile</name>
          <value>2.3</value>
        </property>
      </activation>
      <properties>
        <hbase.profile>2.3</hbase.profile>
        <hbase.compat.version>2.3.0</hbase.compat.version>
        <hbase.version>${hbase-2.3.runtime.version}</hbase.version>
        <hbase.thirdparty.version>3.3.0</hbase.thirdparty.version>
        <zookeeper.version>3.5.7</zookeeper.version>
        <hadoop.version>3.1.3</hadoop.version>
        <tephra.hbase.compat.version>2.3</tephra.hbase.compat.version>
      </properties>
    </profile>
    <profile>
      <!-- PHOENIX-5993 This won't work with the public HBase artifacts -->
      <id>phoenix-hbase-compat-2.4.0</id>
      <activation>
        <property>
          <name>hbase.profile</name>
          <value>2.4.0</value>
        </property>
      </activation>
      <properties>
        <hbase.profile>2.4.0</hbase.profile>
        <hbase.compat.version>2.4.0</hbase.compat.version>
        <hbase.version>${hbase-2.4.0.runtime.version}</hbase.version>
        <hbase.thirdparty.version>3.4.1</hbase.thirdparty.version>
        <zookeeper.version>3.5.7</zookeeper.version>
        <tephra.hbase.compat.version>2.4</tephra.hbase.compat.version>
      </properties>
    </profile>
    <profile>
      <!-- PHOENIX-5993 This won't work with the public HBase artifacts -->
      <id>phoenix-hbase-compat-2.4.1</id>
      <activation>
        <property>
          <name>hbase.profile</name>
          <value>2.4</value>
        </property>
      </activation>
      <properties>
        <hbase.profile>2.4</hbase.profile>
        <hbase.compat.version>2.4.1</hbase.compat.version>
        <hbase.version>${hbase-2.4.runtime.version}</hbase.version>
        <hbase.thirdparty.version>3.4.1</hbase.thirdparty.version>
        <zookeeper.version>3.5.7</zookeeper.version>
        <tephra.hbase.compat.version>2.4</tephra.hbase.compat.version>
      </properties>
    </profile>
    <profile>
      <id>owasp-dependency-check</id>
      <activation>
        <property>
          <name>owasp-check</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.owasp</groupId>
            <artifactId>dependency-check-maven</artifactId>
            <version>${maven-owasp-plugin.version}</version>
            <configuration>
              <skipProvidedScope>true</skipProvidedScope>
              <skipRuntimeScope>true</skipRuntimeScope>
              <skipSystemScope>true</skipSystemScope>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>aggregate</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>codecoverage</id>
      <activation>
        <property>
            <name>!skip.code-coverage</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <version>${jacoco-maven-plugin.version}</version>
            <executions>
              <execution>
                <id>prepare-agent</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <propertyName>jacocoArgLine</propertyName>
                </configuration>
              </execution>
              <execution>
                <id>report</id>
                <phase>post-integration-test</phase>
                <goals>
                  <goal>report</goal>
                </goals>
              </execution>
              <execution>
                <id>check</id>
                <phase>verify</phase>
                <goals>
                    <goal>check</goal>
                </goals>
                <configuration>
                  <rules>
                    <rule>
                      <element>BUNDLE</element>
                      <limits>
                        <limit>
                          <counter>INSTRUCTION</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>${jacoco.instruction.coverage.percentage}</minimum>
                        </limit>
                        <limit>
                          <counter>BRANCH</counter>
                          <value>COVEREDRATIO</value>
                          <minimum>${jacoco.branch.coverage.percentage}</minimum>
                        </limit>
                      </limits>
                    </rule>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>embedded</id>
      <activation>
        <property>
            <name>!skip.embedded</name>
        </property>
      </activation>
      <modules>
        <module>phoenix-client-parent/phoenix-client-embedded</module>
      </modules>
    </profile>
    <profile>
      <id>spotbugs-site</id>
      <activation>
        <property>
            <name>!spotbugs.site</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-maven-plugin</artifactId>
            <configuration>
              <spotbugsXmlOutput>true</spotbugsXmlOutput>
              <xmlOutput>true</xmlOutput>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>linux-aarch64</id>
      <activation>
        <os>
          <family>linux</family>
          <arch>aarch64</arch>
        </os>
      </activation>
      <properties>
        <!-- PHOENIX-6475 Use custom protoc for Linux ARM64 -->
        <protobuf.group>org.openlabtesting.protobuf</protobuf.group>
        <protoc.version>2.5.0.2</protoc.version>
      </properties>
    </profile>
  </profiles>
  <reporting>
    <plugins>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.owasp</groupId>
        <artifactId>dependency-check-maven</artifactId>
        <configuration>
          <skipProvidedScope>true</skipProvidedScope>
          <skipRuntimeScope>true</skipRuntimeScope>
          <skipSystemScope>true</skipSystemScope>
        </configuration>
        <reportSets>
          <reportSet>
              <reports>
                  <report>aggregate</report>
              </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>
</project>
