<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.apache</groupId>
    <artifactId>apache</artifactId>
    <version>19</version>
    <relativePath />
    <!-- no parent resolution -->
  </parent>

  <groupId>org.apache.kylin</groupId>
  <artifactId>kylin</artifactId>
  <packaging>pom</packaging>
  <version>2.6.3</version>

  <name>Apache Kylin</name>
  <url>http://kylin.apache.org</url>
  <inceptionYear>2014</inceptionYear>


  <properties>
    <!-- General Properties -->
    <javaVersion>1.8</javaVersion>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven-model.version>3.3.9</maven-model.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <!-- Hadoop versions -->
    <hadoop2.version>2.7.1</hadoop2.version>
    <yarn.version>2.7.1</yarn.version>

    <!-- Hive versions -->
    <hive.version>1.2.1</hive.version>
    <hive-hcatalog.version>1.2.1</hive-hcatalog.version>

    <!-- HBase versions -->
    <hbase-hadoop2.version>1.1.1</hbase-hadoop2.version>

    <!-- Kafka versions -->
    <kafka.version>1.0.0</kafka.version>

    <!-- Spark versions -->
    <spark.version>2.3.2</spark.version>
    <kryo.version>4.0.0</kryo.version>

    <!-- mysql versions -->
    <mysql-connector.version>5.1.8</mysql-connector.version>

    <!-- Scala versions -->
    <scala.version>2.11.0</scala.version>

    <!-- <reflections.version>0.9.10</reflections.version> -->

    <!-- Calcite Version, the kylin fork is: https://github.com/Kyligence/calcite -->
    <calcite.version>1.16.0-kylin-r2</calcite.version>
    <avatica.version>1.10.0</avatica.version>

    <!-- Hadoop Common deps, keep compatible with hadoop2.version -->
    <zookeeper.version>3.4.13</zookeeper.version>
    <curator.version>2.12.0</curator.version>
    <jsr305.version>3.0.1</jsr305.version>
    <guava.version>14.0</guava.version>
    <jsch.version>0.1.54</jsch.version>
    <commons-cli.version>1.2</commons-cli.version>
    <commons-lang.version>2.6</commons-lang.version>
    <commons-io.version>2.4</commons-io.version>
    <commons-upload.version>1.3.3</commons-upload.version>
    <commons-math3.version>3.1.1</commons-math3.version>
    <commons-collections.version>3.2.2</commons-collections.version>
    <commons-pool.version>2.5.0</commons-pool.version>

    <!-- Calcite deps, keep compatible with calcite.version -->
    <jackson.version>2.9.5</jackson.version>

    <!-- Test Dependency versions -->
    <antlr.version>3.4</antlr.version>
    <junit.version>4.12</junit.version>
    <mrunit.version>1.1.0</mrunit.version>
    <dbunit.version>2.5.4</dbunit.version>
    <h2.version>1.4.196</h2.version>
    <jetty.version>9.3.22.v20171030</jetty.version>
    <jamm.version>0.3.1</jamm.version>
    <mockito.version>2.7.14</mockito.version>
    <powermock.version>1.7.0</powermock.version>
    <curator.version>2.7.1</curator.version>

    <!-- Commons -->
    <commons-lang3.version>3.4</commons-lang3.version>
    <commons-email.version>1.5</commons-email.version>
    <commons-validator.version>1.4.0</commons-validator.version>
    <commons-compress>1.18</commons-compress>

    <!-- Utility -->
    <log4j.version>1.2.17</log4j.version>
    <slf4j.version>1.7.21</slf4j.version>
    <xerces.version>2.11.0</xerces.version>
    <xalan.version>2.7.2</xalan.version>
    <ehcache.version>2.10.2.2.21</ehcache.version>
    <memcached.verion>2.12.3</memcached.verion>
    <apache-httpclient.version>4.2.5</apache-httpclient.version>
    <roaring.version>0.6.18</roaring.version>
    <cglib.version>3.2.4</cglib.version>
    <supercsv.version>2.4.0</supercsv.version>
    <cors.version>2.5</cors.version>
    <tomcat.version>7.0.91</tomcat.version>
    <t-digest.version>3.1</t-digest.version>
    <freemarker.version>2.3.23</freemarker.version>
    <rocksdb.version>5.9.2</rocksdb.version>
    <!--metric-->
    <dropwizard.version>3.1.2</dropwizard.version>
    <!-- REST Service, ref https://github.com/spring-projects/spring-boot/blob/v1.3.8.RELEASE/spring-boot-dependencies/pom.xml -->
    <spring.boot.version>1.3.8.RELEASE</spring.boot.version>
    <spring.framework.version>4.3.10.RELEASE</spring.framework.version>
    <spring.framework.security.version>4.2.3.RELEASE</spring.framework.security.version>
    <spring.framework.security.extensions.version>1.0.2.RELEASE</spring.framework.security.extensions.version>
    <opensaml.version>2.6.6</opensaml.version>
    <aspectj.version>1.8.9</aspectj.version>
    <!-- API forbidden -->
    <forbiddenapis.version>2.3</forbiddenapis.version>

    <!-- Sonar -->
    <jacoco.version>0.8.0</jacoco.version>
    <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
    <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
    <sonar.jacoco.reportPaths>${project.basedir}/../target/jacoco.exec</sonar.jacoco.reportPaths>
    <sonar.language>java</sonar.language>
    <sonar.jacoco.excludes>
      org/apache/kylin/**/tools/**:**/*CLI.java
    </sonar.jacoco.excludes>

    <!-- JVM Args for Testing -->
    <argLine>-Xms1G -Xmx2G -XX:MaxPermSize=512M -Duser.timezone=UTC</argLine>
  </properties>

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

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

  <issueManagement>
    <system>JIRA</system>
    <url>https://issues.apache.org/jira/browse/KYLIN</url>
  </issueManagement>


  <mailingLists>
    <mailingList>
      <name>kylin-user</name>
      <subscribe>user-subscribe@kylin.apache.org</subscribe>
      <unsubscribe>user-unsubscribe@kylin.apache.org</unsubscribe>
      <post>user@kylin.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/kylin-user/</archive>
    </mailingList>
    <mailingList>
      <name>kylin-dev</name>
      <subscribe>dev-subscribe@kylin.apache.org</subscribe>
      <unsubscribe>dev-unsubscribe@kylin.apache.org</unsubscribe>
      <post>dev@kylin.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/kylin-dev/</archive>
    </mailingList>
    <mailingList>
      <name>kylin-issues</name>
      <subscribe>issues-subscribe@kylin.apache.org</subscribe>
      <unsubscribe>issues-unsubscribe@kylin.apache.org</unsubscribe>
      <post>issues@kylin.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/kylin-issues/</archive>
    </mailingList>
    <mailingList>
      <name>kylin-commits</name>
      <subscribe>commits-subscribe@kylin.apache.org</subscribe>
      <unsubscribe>commits-unsubscribe@kylin.apache.org</unsubscribe>
      <post>commits@kylin.apache.org</post>
      <archive>http://mail-archives.apache.org/mod_mbox/kylin-commits/</archive>
    </mailingList>
  </mailingLists>

  <scm>
    <connection>scm:git:git://github.com/apache/kylin.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/apache/kylin.git
    </developerConnection>
    <url>https://github.com/apache/kylin</url>
    <tag>kylin-2.6.3</tag>
  </scm>

  <dependencyManagement>
    <dependencies>
      <!-- Kylin -->
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>atopcalcite</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-common</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-metrics</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-metrics-reporter-hive</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-metrics-reporter-kafka</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-metadata</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-dictionary</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-cube</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-job</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-storage</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-cache</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-engine-mr</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-engine-spark</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-source-hive</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-source-jdbc</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-source-kafka</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-storage-hbase</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-query</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-server-base</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-server</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-jdbc</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-assembly</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-tool</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-tool-assembly</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-it</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-common</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-metadata</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-storage</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-storage-hbase</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-server-base</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-job</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-core-cube</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-datasource-sdk</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-datasource-sdk</artifactId>
        <version>${project.version}</version>
        <classifier>framework</classifier>
      </dependency>
      <dependency>
        <groupId>org.apache.kylin</groupId>
        <artifactId>kylin-assembly</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
      </dependency>

      <!-- Hadoop2 dependencies -->
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-common</artifactId>
        <version>${hadoop2.version}</version>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
          </exclusion>
          <exclusion>
            <groupId>net.java.dev.jets3t</groupId>
            <artifactId>jets3t</artifactId>
          </exclusion>
          <exclusion>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-hdfs</artifactId>
        <version>${hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-mapreduce-client-app</artifactId>
        <version>${hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-yarn-api</artifactId>
        <version>${hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-yarn-common</artifactId>
        <version>${hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-mapreduce-client-core</artifactId>
        <version>${hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
        <version>${hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-mapreduce-client-jobclient</artifactId>
        <version>${hadoop2.version}</version>
        <type>test-jar</type>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-annotations</artifactId>
        <version>${hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-auth</artifactId>
        <version>${hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-minicluster</artifactId>
        <version>${hadoop2.version}</version>
        <optional>true</optional>
      </dependency>
      <dependency>
        <groupId>org.apache.zookeeper</groupId>
        <artifactId>zookeeper</artifactId>
        <version>${zookeeper.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-framework</artifactId>
        <version>${curator.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-recipes</artifactId>
        <version>${curator.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-client</artifactId>
        <version>${curator.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>jsr305</artifactId>
        <version>${jsr305.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <groupId>com.jcraft</groupId>
        <artifactId>jsch</artifactId>
        <version>${jsch.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>commons-cli</groupId>
        <artifactId>commons-cli</artifactId>
        <version>${commons-cli.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>${commons-lang.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-math3</artifactId>
        <version>${commons-math3.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>${commons-upload.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>${commons-collections.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-pool2</artifactId>
        <version>${commons-pool.version}</version>
      </dependency>

      <!-- HBase2 dependencies -->
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-hadoop2-compat</artifactId>
        <version>${hbase-hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-common</artifactId>
        <version>${hbase-hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-client</artifactId>
        <version>${hbase-hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-server</artifactId>
        <version>${hbase-hadoop2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.mrunit</groupId>
        <artifactId>mrunit</artifactId>
        <version>${mrunit.version}</version>
        <classifier>hadoop2</classifier>
      </dependency>
      <dependency>
        <groupId>org.apache.hbase</groupId>
        <artifactId>hbase-testing-util</artifactId>
        <version>${hbase-hadoop2.version}</version>
        <scope>test</scope>
      </dependency>
        <!-- jdbc dependencies -->
      <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>${mysql-connector.version}</version>
        <scope>provided</scope>
      </dependency>
      <!-- Hive dependencies -->
      <dependency>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-jdbc</artifactId>
        <version>${hive.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.hive.hcatalog</groupId>
        <artifactId>hive-hcatalog-core</artifactId>
        <version>${hive-hcatalog.version}</version>
      </dependency>
      <!-- Yarn dependencies -->
      <dependency>
        <groupId>org.apache.hadoop</groupId>
        <artifactId>hadoop-yarn-server-resourcemanager</artifactId>
        <version>${yarn.version}</version>
      </dependency>

      <!-- Calcite dependencies -->
      <dependency>
        <groupId>org.apache.calcite</groupId>
        <artifactId>calcite-core</artifactId>
        <version>${calcite.version}</version>
        <exclusions>
          <exclusion>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>org.apache.calcite</groupId>
        <artifactId>calcite-linq4j</artifactId>
        <version>${calcite.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.calcite.avatica</groupId>
        <artifactId>avatica-core</artifactId>
        <version>${avatica.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.calcite.avatica</groupId>
        <artifactId>avatica</artifactId>
        <version>${avatica.version}</version>
      </dependency>
      <!-- Workaround for hive 0.14 avatica dependency -->
      <dependency>
        <groupId>org.apache.calcite</groupId>
        <artifactId>calcite-avatica</artifactId>
        <version>1.6.0</version>
        <exclusions>
          <exclusion>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
          </exclusion>
        </exclusions>
      </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.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-xml</artifactId>
        <version>${jackson.version}</version>
      </dependency>

      <!-- Spark dependency -->
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-core_2.11</artifactId>
        <version>${spark.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-sql_2.11</artifactId>
        <version>${spark.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-hive_2.11</artifactId>
        <version>${spark.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.esotericsoftware</groupId>
        <artifactId>kryo-shaded</artifactId>
        <version>${kryo.version}</version>
        <scope>provided</scope>
      </dependency>
      <!-- Kafka dependency -->
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka_2.11</artifactId>
        <version>${kafka.version}</version>
        <scope>provided</scope>
      </dependency>

      <!-- Other dependencies -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>${commons-lang3.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-email</artifactId>
        <version>${commons-email.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-validator</groupId>
        <artifactId>commons-validator</artifactId>
        <version>${commons-validator.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-compress</artifactId>
        <version>${commons-compress}</version>
      </dependency>
      <dependency>
        <groupId>org.freemarker</groupId>
        <artifactId>freemarker</artifactId>
        <version>${freemarker.version}</version>
      </dependency>
      <dependency>
        <groupId>org.rocksdb</groupId>
        <artifactId>rocksdbjni</artifactId>
        <version>${rocksdb.version}</version>
      </dependency>

      <!-- Logging -->
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>

      <!-- Metrics -->
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-core</artifactId>
        <version>${dropwizard.version}</version>
      </dependency>
      <dependency>
        <groupId>io.dropwizard.metrics</groupId>
        <artifactId>metrics-jvm</artifactId>
        <version>${dropwizard.version}</version>
      </dependency>

      <!-- Test -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.dbunit</groupId>
        <artifactId>dbunit</artifactId>
        <version>${dbunit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-model</artifactId>
        <version>${maven-model.version}</version>
      </dependency>
      <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>${h2.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>${xerces.version}</version>
      </dependency>
      <dependency>
        <groupId>xalan</groupId>
        <artifactId>xalan</artifactId>
        <version>${xalan.version}</version>
      </dependency>
      <dependency>
        <groupId>com.github.jbellis</groupId>
        <artifactId>jamm</artifactId>
        <version>${jamm.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${apache-httpclient.version}</version>
      </dependency>
      <dependency>
        <groupId>org.roaringbitmap</groupId>
        <artifactId>RoaringBitmap</artifactId>
        <version>${roaring.version}</version>
      </dependency>
      <dependency>
        <groupId>com.tdunning</groupId>
        <artifactId>t-digest</artifactId>
        <version>${t-digest.version}</version>
      </dependency>
      <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>${cglib.version}</version>
      </dependency>
      <dependency>
        <groupId>net.sf.supercsv</groupId>
        <artifactId>super-csv</artifactId>
        <version>${supercsv.version}</version>
      </dependency>
      <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjrt</artifactId>
        <version>${aspectj.version}</version>
      </dependency>
      <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjweaver</artifactId>
        <version>${aspectj.version}</version>
      </dependency>
      <dependency>
        <groupId>com.thetransactioncompany</groupId>
        <artifactId>cors-filter</artifactId>
        <version>${cors.version}</version>
      </dependency>
      <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache</artifactId>
        <version>${ehcache.version}</version>
      </dependency>
      <dependency>
        <groupId>net.spy</groupId>
        <artifactId>spymemcached</artifactId>
        <version>${memcached.verion}</version>
      </dependency>
      <dependency>
        <groupId>org.opensaml</groupId>
        <artifactId>opensaml</artifactId>
        <version>${opensaml.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.curator</groupId>
        <artifactId>curator-test</artifactId>
        <version>${curator.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- Spring Core -->
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${spring.framework.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
        <version>${spring.framework.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aop</artifactId>
        <version>${spring.framework.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
        <version>${spring.framework.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <version>${spring.framework.version}</version>
      </dependency>
      <!-- Spring Security -->
      <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-acl</artifactId>
        <version>${spring.framework.security.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>${spring.framework.security.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>${spring.framework.security.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-ldap</artifactId>
        <version>${spring.framework.security.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-web</artifactId>
        <version>${spring.framework.security.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.security.extensions</groupId>
        <artifactId>spring-security-saml2-core</artifactId>
        <version>${spring.framework.security.extensions.version}</version>
      </dependency>

      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-server</artifactId>
        <version>${jetty.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-webapp</artifactId>
        <version>${jetty.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>tomcat-catalina</artifactId>
        <version>${tomcat.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.tomcat</groupId>
        <artifactId>tomcat-jasper</artifactId>
        <version>${tomcat.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.tomcat.embed</groupId>
        <artifactId>tomcat-embed-core</artifactId>
        <version>${tomcat.version}</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>${scala.version}</version>
      </dependency>

      <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-compiler</artifactId>
        <version>${scala.version}</version>
      </dependency>

      <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-reflect</artifactId>
        <version>${scala.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>

    <!-- the logging dependencies are inherited by all modules for their generality
        log4j and slf4j-log4j12 test scope only for UT/IT use -->
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <!--for transitive dependencies like commons-collectinos, commons-lang -->
    <dependency>
      <groupId>org.apache.hadoop</groupId>
      <artifactId>hadoop-common</artifactId>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>central</id>
      <name>Central Repository</name>
      <url>http://repo.maven.apache.org/maven2</url>
      <layout>default</layout>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>

    <repository>
      <id>conjars</id>
      <url>http://conjars.org/repo/</url>
    </repository>

    <repository>
      <id>cloudera</id>
      <url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
    </repository>

    <repository>
      <id>shibboleth</id>
      <url>https://build.shibboleth.net/nexus/content/repositories/releases/</url>
    </repository>

    <repository>
      <id>kyligence</id>
      <name>Kyligence Repository</name>
      <url>http://repository.kyligence.io:8081/repository/maven-public/
      </url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.5.1</version>
          <configuration>
            <source>${javaVersion}</source>
            <target>${javaVersion}</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.5.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.1</version>
          <configuration>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
          <executions>
            <execution>
              <goals>
                <goal>test-jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.6</version>
          <configuration>
            <packagingExcludes>
              WEB-INF/lib/servlet-api-*.jar,
              WEB-INF/lib/zookeeper-*.jar
            </packagingExcludes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.0.1</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <phase>package</phase>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <includePom>true</includePom>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>2.17</version>
          <dependencies>
            <dependency>
              <groupId>com.puppycrawl.tools</groupId>
              <artifactId>checkstyle</artifactId>
              <version>8.6</version>
            </dependency>
          </dependencies>
          <executions>
            <execution>
              <id>check-style</id>
              <phase>validate</phase>
              <configuration>
                <configLocation>dev-support/checkstyle.xml</configLocation>
                <suppressionsLocation>dev-support/checkstyle-suppressions.xml</suppressionsLocation>
                <includeTestSourceDirectory>true</includeTestSourceDirectory>
                <consoleOutput>true</consoleOutput>
                <failsOnError>true</failsOnError>
              </configuration>
              <goals>
                <goal>check</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>3.1.1</version>
          <configuration>
            <xmlOutput>true</xmlOutput>
            <effort>Max</effort>
            <threshold>Low</threshold>
            <failOnError>false</failOnError>
          </configuration>
        </plugin>
        <plugin>
          <groupId>net.ju-n.maven.plugins</groupId>
          <artifactId>checksum-maven-plugin</artifactId>
          <version>1.3</version>
        </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.apache.maven.plugins
                    </groupId>
                    <artifactId>
                      maven-checkstyle-plugin
                    </artifactId>
                    <versionRange>
                      [2.13,)
                    </versionRange>
                    <goals>
                      <goal>check</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.6.0</version>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>${spring.boot.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.10</version>
        </plugin>

        <plugin>
          <groupId>de.thetaphi</groupId>
          <artifactId>forbiddenapis</artifactId>
          <version>${forbiddenapis.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>analyze</id>
            <goals>
              <goal>analyze-only</goal>
            </goals>
            <!--<configuration>-->
            <!--<failOnWarning>true</failOnWarning>-->
            <!--</configuration>-->
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <excludePackageNames>org.apache.kylin.*</excludePackageNames>
        </configuration>
      </plugin>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <!-- uncomment this on release -->
        <!--<version>3.4.1</version>-->
      </plugin>
    </plugins>
  </build>

  <modules>
    <module>core-common</module>
    <module>core-metadata</module>
    <module>core-dictionary</module>
    <module>core-cube</module>
    <module>core-job</module>
    <module>core-storage</module>
    <module>engine-mr</module>
    <module>engine-spark</module>
    <module>source-hive</module>
    <module>source-jdbc</module>
    <module>source-kafka</module>
    <module>storage-hbase</module>
    <module>query</module>
    <module>server-base</module>
    <module>server</module>
    <module>jdbc</module>
    <module>assembly</module>
    <module>tool</module>
    <module>tool-assembly</module>
    <module>kylin-it</module>
    <module>tomcat-ext</module>
    <module>core-metrics</module>
    <module>metrics-reporter-hive</module>
    <module>metrics-reporter-kafka</module>
    <module>cache</module>
    <module>datasource-sdk</module>
  </modules>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.9</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>summary</report>
              <report>dependency-info</report>
              <report>project-team</report>
              <report>scm</report>
              <report>issue-tracking</report>
              <report>mailing-list</report>
              <!-- <report>dependency-management</report> -->
              <!-- <report>dependencies</report> -->
              <!-- <report>dependency-convergence</report> -->
              <report>cim</report>
              <report>plugin-management</report>
              <report>plugins</report>
              <report>distribution-management</report>
              <report>license</report>
              <report>modules</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>3.1.1</version>
      </plugin>
    </plugins>
  </reporting>

  <profiles>
    <profile>
      <id>sandbox</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
          <name>pre-commit</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <fork>true</fork>
              <meminitial>1024m</meminitial>
              <maxmem>2048m</maxmem>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>copy-jamm</id>
                <goals>
                  <goal>copy</goal>
                </goals>
                <phase>generate-test-resources</phase>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>com.github.jbellis</groupId>
                      <artifactId>jamm</artifactId>
                      <outputDirectory>${project.build.testOutputDirectory}
                      </outputDirectory>
                      <destFileName>jamm.jar</destFileName>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>de.thetaphi</groupId>
            <artifactId>forbiddenapis</artifactId>
            <configuration>
              <!--
              if the used Java version is too new, don't fail, just do nothing:
             -->
              <failOnUnsupportedJava>false</failOnUnsupportedJava>
              <bundledSignatures>
                <bundledSignature>jdk-unsafe</bundledSignature>
                <bundledSignature>jdk-deprecated</bundledSignature>
                <!--<bundledSignature>jdk-non-portable</bundledSignature>-->
              </bundledSignatures>
              <signaturesFiles>
                <signaturesFile>
                  ${user.dir}/dev-support/signatures.txt
                </signaturesFile>
              </signaturesFiles>
            </configuration>

            <executions>
              <execution>
                <phase>test-compile</phase>
                <goals>
                  <goal>check</goal>
                  <goal>testCheck</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>pre-test</id>
                <goals>
                  <goal>prepare-agent</goal>
                </goals>
                <configuration>
                  <append>true</append>
                  <destFile>${sonar.jacoco.reportPaths}</destFile>
                  <propertyName>surefireArgLine</propertyName>
                </configuration>
              </execution>
              <execution>
                <id>post-test</id>
                <phase>test</phase>
                <goals>
                  <goal>report</goal>
                </goals>
                <configuration>
                  <dataFile>${sonar.jacoco.reportPaths}</dataFile>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.21.0</version>
            <configuration>
              <reportsDirectory>${project.basedir}/../target/surefire-reports
              </reportsDirectory>
              <excludes>
                <exclude>**/IT*.java</exclude>
              </excludes>
              <systemProperties>
                <property>
                  <name>buildCubeUsingProvidedData</name>
                  <value>false</value>
                </property>
                <property>
                  <name>log4j.configuration</name>
                  <value>
                    file:${project.basedir}/../build/conf/kylin-tools-log4j.properties
                  </value>
                </property>
              </systemProperties>
              <argLine>-javaagent:${project.build.testOutputDirectory}/jamm.jar
                ${argLine} ${surefireArgLine}
              </argLine>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.eluder.coveralls</groupId>
            <artifactId>coveralls-maven-plugin</artifactId>
            <version>4.2.0</version>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>cdh5.7</id>
      <properties>
        <hadoop2.version>2.6.0-cdh5.7.0</hadoop2.version>
        <yarn.version>2.6.0-cdh5.7.0</yarn.version>
        <hive.version>1.1.0-cdh5.7.0</hive.version>
        <hive-hcatalog.version>1.1.0-cdh5.7.0</hive-hcatalog.version>
        <hbase-hadoop2.version>1.2.0-cdh5.7.0</hbase-hadoop2.version>
        <zookeeper.version>3.4.5-cdh5.7.0</zookeeper.version>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <fork>true</fork>
              <meminitial>1024m</meminitial>
              <maxmem>2048m</maxmem>
            </configuration>
          </plugin>

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-dependency-plugin</artifactId>
      <executions>
        <execution>
          <id>copy-jamm</id>
          <goals>
            <goal>copy</goal>
          </goals>
          <phase>generate-test-resources</phase>
          <configuration>
            <artifactItems>
              <artifactItem>
                <groupId>com.github.jbellis</groupId>
                <artifactId>jamm</artifactId>
                <outputDirectory>${project.build.testOutputDirectory}
                </outputDirectory>
                <destFileName>jamm.jar</destFileName>
              </artifactItem>
            </artifactItems>
          </configuration>
        </execution>
      </executions>
    </plugin>

    <plugin>
      <groupId>org.jacoco</groupId>
      <artifactId>jacoco-maven-plugin</artifactId>
      <configuration>
        <append>true</append>
        <destFile>
          ${sonar.jacoco.reportPaths}
        </destFile>
      </configuration>
      <executions>
        <execution>
          <id>pre-test</id>
          <goals>
            <goal>prepare-agent</goal>
          </goals>
          <configuration>
            <propertyName>surefireArgLine</propertyName>
          </configuration>
        </execution>
        <execution>
          <id>post-test</id>
          <phase>test</phase>
          <goals>
            <goal>report</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-plugin</artifactId>
      <version>2.21.0</version>
      <configuration>
        <reportsDirectory>${project.basedir}/../target/surefire-reports
        </reportsDirectory>
        <excludes>
          <exclude>**/IT*.java</exclude>
        </excludes>
        <systemProperties>
          <property>
            <name>buildCubeUsingProvidedData</name>
            <value>false</value>
          </property>
          <property>
            <name>log4j.configuration</name>
            <value>
              file:${project.basedir}/../build/conf/kylin-tools-log4j.properties
            </value>
          </property>
        </systemProperties>
        <argLine>-javaagent:${project.build.testOutputDirectory}/jamm.jar
          ${argLine} ${surefireArgLine}
        </argLine>
      </configuration>
    </plugin>
  </plugins>
</build>
</profile>
<profile>
<!-- This profile adds/overrides few features of the 'apache-release'
     profile in the parent pom. -->
      <id>apache-release</id>
      <activation>
        <property>
          <name>pre-commit</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
              <skip>false</skip>
            </configuration>
          </plugin>
          <!-- Override the parent assembly execution to customize the assembly
              descriptor and final name. -->
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>source-release-assembly</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <tarLongFileMode>posix</tarLongFileMode>
                  <runOnlyAtExecutionRoot>true</runOnlyAtExecutionRoot>
                  <appendAssemblyId>true</appendAssemblyId>
                  <descriptors>
                    <descriptor>
                    assembly/src/main/config/assemblies/source-assembly.xml
                    </descriptor>
                  </descriptors>
                  <finalName>apache-kylin-${project.version}</finalName>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <!-- Apache-RAT checks for files without headers.
               If run on a messy developer's sandbox, it will fail.
               This serves as a reminder to only build a release in a clean
               sandbox! -->
          <plugin>
            <groupId>org.apache.rat</groupId>
            <artifactId>apache-rat-plugin</artifactId>
            <configuration>
              <!-- Exclude files/folders for apache release -->
              <excludes>
                <exclude>DEPENDENCIES</exclude>
                <exclude>.settings/**</exclude>
                <exclude>**/LICENSE*</exclude>
                <!-- Local git repo -->
                <exclude>.git/**</exclude>
                <exclude>.gitconfig</exclude>
                <!-- IDE files -->
                <exclude>.idea/**</exclude>
                <exclude>**/*.iml</exclude>
                <exclude>**/.classpath</exclude>
                <exclude>**/.project</exclude>
                <exclude>**/.settings/**</exclude>

                <!-- image files constitute images required for documentation. .pptx contain the sources for images -->
                <exclude>**/*.png</exclude>
                <exclude>**/*.jpg</exclude>
                <exclude>**/*.gif</exclude>
                <exclude>**/*.ico</exclude>
                <exclude>**/*.svg</exclude>

                <!--Test Data-->
                <exclude>**/src/test/resources/**</exclude>
                <exclude>examples/sample_cube/template/**</exclude>
                <exclude>examples/test_case_data/localmeta/**</exclude>
                <exclude>examples/test_metadata/**</exclude>

                <!-- generated files -->
                <exclude>**/target/**</exclude>
                <exclude>lib/**</exclude>
                <exclude>dist/**</exclude>
                <exclude>website/**</exclude>
                <exclude>**/dependency-reduced-pom.xml</exclude>

                <!-- text files without comments -->
                <exclude>**/*.csv</exclude>
                <exclude>**/*.json</exclude>
                <exclude>**/*.json.bad</exclude>
                <exclude>**/*.md</exclude>

                <!-- binary files -->
                <exclude>**/*.dict</exclude>
                <exclude>**/*.dic</exclude>
                <exclude>**/*.snapshot</exclude>
                <exclude>**/*.pdf</exclude>
                <exclude>**/*.docx</exclude>
                <exclude>**/*.doc</exclude>
                <exclude>**/*.txt</exclude>
                <exclude>**/.checkstyle</exclude>
                <exclude>**/*.eot</exclude>
                <exclude>**/*.ttf</exclude>
                <exclude>**/*.woff</exclude>

                <!-- Kylin's website content -->
                <exclude>**/.sass-cache/**</exclude>

                <!-- tomcat package -->
                <exclude>tomcat/**</exclude>

                <!-- front end libary and generated files -->
                <exclude>webapp/node_modules/**</exclude>
                <exclude>webapp/dist/**</exclude>
                <exclude>webapp/app/components/**</exclude>
                <!-- json configuration file-->
                <exclude>webapp/.bowerrc</exclude>
                <exclude>webapp/.jshintrc</exclude>
                <!-- generated dict files -->
                <exclude>dictionary/metastore_db/**</exclude>

                <!-- MIT license -->
                <exclude>webapp/app/css/AdminLTE.css</exclude>
                <exclude>webapp/app/css/messenger-theme-ice.css</exclude>
                <exclude>webapp/app/js/directives/kylin_abn_tree_directive.js</exclude>
                <exclude>webapp/app/js/directives/angular-tree-control.js</exclude>
                <exclude>webapp/app/js/directives/datetimepicker.js</exclude>
                <exclude>webapp/app/js/directives/select.js</exclude>
                <exclude>webapp/app/js/directives/ui-grid.js</exclude>

                <!--configuration file -->
                <exclude>webapp/app/routes.json</exclude>
                <exclude>webapp/bower.json</exclude>
                <exclude>webapp/grunt.json</exclude>
                <exclude>webapp/package.json</exclude>

                <!-- logs -->
                <exclude>**/*.log</exclude>
                <exclude>jdbc/kylin_jdbc.log*</exclude>
                <exclude>server/logs/**</exclude>

                <!-- jdbc service -->
                <exclude>**/java.sql.Driver</exclude>

                <!--ODBC sub project is a VS project, exclude related files -->
                <exclude>**/*.sln</exclude>
                <exclude>**/*.vcxproj</exclude>
                <exclude>**/*.vcxproj.filters</exclude>
                <exclude>**/*.vcxproj.user</exclude>
                <exclude>**/*.props</exclude>
                <exclude>**/*.RC</exclude>
                <exclude>**/*.dsp</exclude>
                <exclude>**/*.DEF</exclude>
                <exclude>**/*.isl</exclude>
                <exclude>**/*.isproj</exclude>
                <exclude>**/*.bmp</exclude>

                <!-- protobuf generated -->
                <exclude>
                  src/main/java/org/apache/kylin/storage/hbase/ii/coprocessor/endpoint/generated/IIProtos.java
                </exclude>
                <exclude>
                  src/main/java/org/apache/kylin/storage/hbase/cube/v1/filter/generated/FilterProtosExt.java
                </exclude>
                <exclude>
                  src/main/java/org/apache/kylin/storage/hbase/cube/v2/coprocessor/endpoint/generated/CubeVisitProtos.java
                </exclude>
              </excludes>
            </configuration>
            <executions>
              <execution>
                <phase>verify</phase>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.apache.maven.doxia</groupId>
                <artifactId>doxia-core</artifactId>
                <version>1.7</version>
                <exclusions>
                  <exclusion>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                  </exclusion>
                </exclusions>
              </dependency>
            </dependencies>
          </plugin>
          <plugin>
            <groupId>net.ju-n.maven.plugins</groupId>
            <artifactId>checksum-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>artifacts</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <algorithms>
                <algorithm>SHA-256</algorithm>
              </algorithms>
              <failOnError>false</failOnError>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
