<?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">
  <parent>
    <artifactId>hudi</artifactId>
    <groupId>org.apache.hudi</groupId>
    <version>0.15.0-h0.cbu.mrs.360.r18</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>hudi-flink1.20-bundle</artifactId>
  <packaging>jar</packaging>

  <properties>
    <checkstyle.skip>true</checkstyle.skip>
    <main.basedir>${project.parent.basedir}</main.basedir>
    <skipTests>true</skipTests>
    <flink.bundle.hive.scope>provided</flink.bundle.hive.scope>
    <flink.bundle.shade.prefix>org.apache.hudi.</flink.bundle.shade.prefix>
    <javax.servlet.version>3.1.0</javax.servlet.version>
    <!-- override to be same with flink 1.15.x -->
    <parquet.version>${flink.format.parquet.version}</parquet.version>
    <thrift.version>0.9.3</thrift.version>
    <httpcomponents.version>4.5.14</httpcomponents.version>
    <httpcore.version>4.4.16</httpcore.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.rat</groupId>
        <artifactId>apache-rat-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-shade-plugin</artifactId>
        <version>${maven-shade-plugin.version}</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <createSourcesJar>${shadeSources}</createSourcesJar>
              <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml
              </dependencyReducedPomLocation>
              <transformers>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer">
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer">
                  <addHeader>true</addHeader>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                  <resource>META-INF/LICENSE</resource>
                  <file>target/classes/META-INF/LICENSE</file>
                </transformer>
                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
              </transformers>
              <artifactSet>
                <includes combine.children="append">
                  <include>org.apache.hudi:hudi-hadoop-common</include>
                  <include>org.apache.hudi:hudi-common</include>
                  <include>org.apache.hudi:hudi-client-common</include>
                  <include>org.apache.hudi:hudi-flink-client</include>
                  <include>org.apache.hudi:hudi-flink</include>
                  <include>org.apache.hudi:${hudi.flink.module}</include>
                  <include>org.apache.hudi:hudi-hive-sync</include>
                  <include>org.apache.hudi:hudi-sync-common</include>
                  <include>org.apache.hudi:hudi-hadoop-mr</include>
                  <include>org.apache.hudi:hudi-timeline-service</include>
                  <include>org.apache.hudi:hudi-native-io</include>

                  <!-- Kryo -->
                  <include>com.esotericsoftware:kryo-shaded</include>
                  <include>com.esotericsoftware:minlog</include>
                  <include>org.objenesis:objenesis</include>

                  <include>com.yammer.metrics:metrics-core</include>
                  <include>com.beust:jcommander</include>
                  <include>io.javalin:javalin</include>
                  <include>org.jetbrains.kotlin:*</include>
                  <include>org.rocksdb:rocksdbjni</include>
                  <include>org.antlr:stringtemplate</include>
                  <!-- Parquet -->
                  <include>org.apache.parquet:parquet-avro</include>
                  <include>org.apache.parquet:parquet-hadoop</include>
                  <include>org.apache.parquet:parquet-column</include>
                  <include>org.apache.parquet:parquet-common</include>
                  <include>org.apache.parquet:parquet-format-structures</include>
                  <include>org.apache.parquet:parquet-encoding</include>
                  <include>org.apache.parquet:parquet-jackson</include>

                  <include>org.apache.avro:avro</include>
                  <include>joda-time:joda-time</include>
                  <include>com.fasterxml.jackson.core:jackson-annotations</include>
                  <include>com.fasterxml.jackson.core:jackson-core</include>
                  <include>com.fasterxml.jackson.core:jackson-databind</include>
                  <include>com.fasterxml.jackson.datatype:jackson-datatype-jsr310</include>

                  <include>com.lmax:disruptor</include>
                  <include>com.github.davidmoten:guava-mini</include>
                  <include>com.github.davidmoten:hilbert-curve</include>
                  <include>com.github.ben-manes.caffeine:caffeine</include>
                  <include>com.twitter:bijection-avro_2.12</include>
                  <include>com.twitter:bijection-core_2.12</include>
                  <include>io.dropwizard.metrics:metrics-core</include>
                  <include>io.dropwizard.metrics:metrics-graphite</include>
                  <include>io.dropwizard.metrics:metrics-jmx</include>
                  <include>io.prometheus:simpleclient</include>
                  <include>io.prometheus:simpleclient_httpserver</include>
                  <include>io.prometheus:simpleclient_dropwizard</include>
                  <include>io.prometheus:simpleclient_pushgateway</include>
                  <include>io.prometheus:simpleclient_common</include>

                  <!-- Used for HUDI TimelineService -->
                  <include>org.eclipse.jetty:*</include>
                  <include>org.eclipse.jetty.websocket:*</include>
                  <include>javax.servlet:javax.servlet-api</include>

                  <include>org.apache.flink:${flink.hadoop.compatibility.artifactId}</include>
                  <include>org.apache.flink:flink-json</include>
                  <include>org.apache.flink:${flink.parquet.artifactId}</include>
                  <include>org.apache.flink:flink-metrics-dropwizard</include>

                  <include>org.apache.hive:hive-common</include>
                  <include>org.apache.hive:hive-service</include>
                  <include>org.apache.hive:hive-service-rpc</include>
                  <include>org.apache.hive:hive-exec</include>
                  <include>org.apache.hive:hive-standalone-metastore</include>
                  <include>org.apache.hive:hive-metastore</include>
                  <include>org.apache.hive:hive-jdbc</include>
                  <include>org.datanucleus:datanucleus-core</include>
                  <include>org.datanucleus:datanucleus-api-jdo</include>
                  <include>org.apache.thrift:libfb303</include>
                  <include>org.apache.orc:orc-core</include>

                  <include>commons-codec:commons-codec</include>
                  <include>commons-io:commons-io</include>
                  <include>org.openjdk.jol:jol-core</include>
                </includes>
              </artifactSet>
              <relocations combine.children="append">
                <!-- Kryo -->
                <relocation>
                  <pattern>com.esotericsoftware.kryo.</pattern>
                  <shadedPattern>org.apache.hudi.com.esotericsoftware.kryo.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.esotericsoftware.reflectasm.</pattern>
                  <shadedPattern>org.apache.hudi.com.esotericsoftware.reflectasm.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.esotericsoftware.minlog.</pattern>
                  <shadedPattern>org.apache.hudi.com.esotericsoftware.minlog.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.objenesis.</pattern>
                  <shadedPattern>org.apache.hudi.org.objenesis.</shadedPattern>
                </relocation>

                <relocation>
                  <pattern>javax.servlet.</pattern>
                  <shadedPattern>${flink.bundle.shade.prefix}javax.servlet.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.avro.</pattern>
                  <shadedPattern>${flink.bundle.shade.prefix}org.apache.avro.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.io.</pattern>
                  <shadedPattern>org.apache.hudi.org.apache.commons.io.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.yammer.metrics.</pattern>
                  <shadedPattern>${flink.bundle.shade.prefix}com.yammer.metrics.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.beust.jcommander.</pattern>
                  <shadedPattern>${flink.bundle.shade.prefix}com.beust.jcommander.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons.codec.</pattern>
                  <shadedPattern>${flink.bundle.shade.prefix}org.apache.commons.codec.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.eclipse.jetty.</pattern>
                  <shadedPattern>${flink.bundle.shade.prefix}org.apache.jetty.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.fasterxml.jackson.</pattern>
                  <shadedPattern>${flink.bundle.shade.prefix}com.fasterxml.jackson.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.openjdk.jol.</pattern>
                  <shadedPattern>org.apache.hudi.org.openjdk.jol.</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.parquet.avro.</pattern>
                  <shadedPattern>${flink.bundle.shade.prefix}org.apache.parquet.avro.</shadedPattern>
                </relocation>
              </relocations>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                    <exclude>META-INF/services/javax.*</exclude>
                    <exclude>META-INF/versions/21/**</exclude>
                    <exclude>META-INF/versions/22/**</exclude>
                    <exclude>**/*.proto</exclude>
                    <exclude>hbase-webapps/**</exclude>
                    <!-- hbase-default.xml comes from hbase-common, hbase related classes used in hudi are in shaded
                    pattern, the default classes in hbase-default.xml can cause ClassNotFoundException. -->
                    <exclude>hbase-default.xml</exclude>
                  </excludes>
                </filter>
              </filters>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
    </resources>
  </build>

  <dependencies>
    <!-- Hoodie -->
    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-common</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
       </exclusion>
       <exclusion>
          <artifactId>rocksdbjni</artifactId>
          <groupId>org.rocksdb</groupId>
        </exclusion>
        <exclusion>
          <artifactId>commons-digester</artifactId>
          <groupId>commons-digester</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-client-common</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-flink-client</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>${hudi.flink.module}</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-flink</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-hadoop-mr</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-hive-sync</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hudi</groupId>
      <artifactId>hudi-timeline-service</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>rocksdbjni</artifactId>
          <groupId>org.rocksdb</groupId>
        </exclusion>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Kryo -->
    <dependency>
      <groupId>com.esotericsoftware</groupId>
      <artifactId>kryo-shaded</artifactId>
      <version>${kryo.shaded.version}</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>${javax.servlet.version}</version>
    </dependency>

    <!-- Flink -->
    <dependency>
      <groupId>org.apache.flink</groupId>
      <artifactId>${flink.hadoop.compatibility.artifactId}</artifactId>
      <version>${flink.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.flink</groupId>
      <artifactId>${flink.parquet.artifactId}</artifactId>
      <version>${flink.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.flink</groupId>
      <artifactId>flink-json</artifactId>
      <version>${flink.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.flink</groupId>
      <artifactId>flink-metrics-dropwizard</artifactId>
      <version>${flink.version}</version>
      <scope>compile</scope>
    </dependency>

    <!-- Parquet -->
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-hadoop</artifactId>
      <version>${parquet.version}</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>org.xerial.snappy</groupId>
          <artifactId>snappy-java</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-avro</artifactId>
      <version>${parquet.version}</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>org.apache.hadoop</groupId>
          <artifactId>hadoop-client</artifactId>
        </exclusion>
        <exclusion>
          <groupId>it.unimi.dsi</groupId>
          <artifactId>fastutil</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-column</artifactId>
      <version>${parquet.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-common</artifactId>
      <version>${parquet.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-encoding</artifactId>
      <version>${parquet.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-format-structures</artifactId>
      <version>${parquet.version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.parquet</groupId>
      <artifactId>parquet-jackson</artifactId>
      <version>${parquet.version}</version>
      <scope>compile</scope>
    </dependency>

    <!-- Avro -->
    <dependency>
      <groupId>org.apache.avro</groupId>
      <artifactId>avro</artifactId>
      <version>${flink.avro.version}</version>
      <scope>compile</scope>
    </dependency>

    <!-- Hive -->
    <dependency>
      <groupId>${hive.groupid}</groupId>
      <artifactId>hive-service</artifactId>
      <version>${hive.version}</version>
      <scope>${flink.bundle.hive.scope}</scope>
      <exclusions>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.pentaho</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>${hive.groupid}</groupId>
      <artifactId>hive-exec</artifactId>
      <version>${hive.version}</version>
      <scope>${flink.bundle.hive.scope}</scope>
      <exclusions>
        <exclusion>
          <groupId>org.pentaho</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>${hive.groupid}</groupId>
      <artifactId>hive-metastore</artifactId>
      <version>${hive.version}</version>
      <scope>${flink.bundle.hive.scope}</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.datanucleus</groupId>
          <artifactId>datanucleus-core</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.servlet.jsp</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>${hive.groupid}</groupId>
      <artifactId>hive-jdbc</artifactId>
      <version>${hive.version}</version>
      <scope>${flink.bundle.hive.scope}</scope>
      <exclusions>
        <exclusion>
          <groupId>javax.servlet</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.servlet.jsp</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>${hive.groupid}</groupId>
      <artifactId>hive-common</artifactId>
      <version>${hive.version}</version>
      <scope>${flink.bundle.hive.scope}</scope>
      <exclusions>
        <exclusion>
          <groupId>org.eclipse.jetty.orbit</groupId>
          <artifactId>javax.servlet</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.datanucleus</groupId>
      <artifactId>datanucleus-core</artifactId>
      <scope>${flink.bundle.hive.scope}</scope>
      <version>5.0.1</version>
    </dependency>
    <dependency>
      <groupId>org.datanucleus</groupId>
      <artifactId>datanucleus-api-jdo</artifactId>
      <scope>${flink.bundle.hive.scope}</scope>
      <version>5.0.1</version>
    </dependency>

    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-server</artifactId>
      <version>${jetty.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-util</artifactId>
      <version>${jetty.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-webapp</artifactId>
      <version>${jetty.version}</version>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-http</artifactId>
      <version>${jetty.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.thrift</groupId>
      <artifactId>libfb303</artifactId>
      <version>${thrift.version}</version>
      <scope>${flink.bundle.hive.scope}</scope>
    </dependency>

    <!-- ORC -->
    <dependency>
      <groupId>org.apache.orc</groupId>
      <artifactId>orc-core</artifactId>
      <version>${orc.flink.version}</version>
      <scope>${flink.bundle.hive.scope}</scope>
      <exclusions>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-lang</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- Fasterxml -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.airlift</groupId>
      <artifactId>aircompressor</artifactId>
      <version>0.27</version>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <version>${httpcomponents.version}</version>
      <exclusions>
        <exclusion>
          <artifactId>httpcore</artifactId>
          <groupId>org.apache.httpcomponents</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore</artifactId>
      <version>${httpcore.version}</version>
      <exclusions>
        <exclusion>
          <groupId>*</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>flink-bundle-shade-hive1</id>
      <properties>
        <hive.version>3.1.0-h0.cbu.mrs.360.r18</hive.version>
        <thrift.version>0.9.2</thrift.version>
        <flink.bundle.hive.scope>compile</flink.bundle.hive.scope>
      </properties>
    </profile>
    <profile>
      <id>flink-bundle-shade-hive2</id>
      <properties>
        <hive.version>3.1.0-h0.cbu.mrs.360.r18</hive.version>
        <flink.bundle.hive.scope>compile</flink.bundle.hive.scope>
      </properties>
      <dependencies>
        <dependency>
          <groupId>${hive.groupid}</groupId>
          <artifactId>hive-service-rpc</artifactId>
          <version>${hive.version}</version>
          <scope>${flink.bundle.hive.scope}</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>flink-bundle-shade-hive3</id>
      <properties>
        <hive.version>3.1.0-h0.cbu.mrs.360.r18</hive.version>
        <flink.bundle.hive.scope>compile</flink.bundle.hive.scope>
      </properties>
      <dependencies>
        <dependency>
          <groupId>${hive.groupid}</groupId>
          <artifactId>hive-service-rpc</artifactId>
          <version>${hive.version}</version>
          <scope>${flink.bundle.hive.scope}</scope>
        </dependency>
        <dependency>
          <groupId>${hive.groupid}</groupId>
          <artifactId>hive-standalone-metastore</artifactId>
          <version>${hive.version}</version>
          <scope>${flink.bundle.hive.scope}</scope>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>hudi-platform-service</id>
      <activation>
        <property>
          <name>deployArtifacts</name>
          <value>true</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.hudi</groupId>
          <artifactId>hudi-metaserver-client</artifactId>
          <version>${project.version}</version>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>${maven-shade-plugin.version}</version>
            <executions>
              <execution>
                <configuration>
                  <artifactSet>
                    <includes combine.children="append">
                      <include>org.apache.hudi:hudi-metaserver-client</include>
                    </includes>
                  </artifactSet>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
