<?xml version="1.0" encoding="UTF-8"?>
<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">
  <parent>
    <artifactId>flink-connector-hbase-parent</artifactId>
    <groupId>org.apache.flink</groupId>
    <version>4.0.0-1.18</version>
    <relativePath>../../pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>flink-sql-connector-hbase-2.2</artifactId>
  <name>Flink : Connectors : SQL : HBase 2.2</name>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <id>shade-flink</id>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <transformers>
                <transformer>
                  <resource>hbase-default.xml</resource>
                  <file>hbase-default.xml</file>
                </transformer>
              </transformers>
              <artifactSet>
                <includes>
                  <include>org.apache.flink:flink-connector-base</include>
                  <include>org.apache.flink:flink-connector-hbase-base</include>
                  <include>org.apache.flink:flink-connector-hbase-2.2</include>
                  <include>org.apache.hbase:hbase-*</include>
                  <include>org.apache.hbase.thirdparty:hbase-shaded-*</include>
                  <include>org.apache.zookeeper:zookeeper</include>
                  <include>org.apache.htrace:htrace-core4</include>
                  <include>com.google.protobuf:protobuf-java</include>
                  <include>commons-codec:commons-codec</include>
                  <include>org.apache.commons:commons-crypto</include>
                  <include>org.apache.commons:commons-lang3</include>
                  <include>io.netty:*</include>
                  <include>io.dropwizard.metrics:metrics-core</include>
                </includes>
                <excludes>
                  <exclude>org.apache.hbase:hbase-metrics*</exclude>
                  <exclude>org.apache.hbase:hbase-server*</exclude>
                  <exclude>org.apache.hbase:hbase-hadoop*-compat</exclude>
                </excludes>
              </artifactSet>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/services/com.fasterxml.**</exclude>
                    <exclude>META-INF/services/org.apache.hadoop.**</exclude>
                    <exclude>META-INF/services/javax.**</exclude>
                    <exclude>digesterRules.xml</exclude>
                    <exclude>properties.dtd</exclude>
                    <exclude>PropertyList-1.0.dtd</exclude>
                    <exclude>LICENSE.txt</exclude>
                    <exclude>*.proto</exclude>
                    <exclude>protobuf/*</exclude>
                  </excludes>
                </filter>
              </filters>
              <relocations>
                <relocation>
                  <pattern>org.apache.zookeeper</pattern>
                  <shadedPattern>org.apache.flink.hbase.shaded.org.apache.zookeeper</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.htrace</pattern>
                  <shadedPattern>org.apache.flink.hbase.shaded.org.apache.htrace</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.google</pattern>
                  <shadedPattern>org.apache.flink.hbase.shaded.com.google</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>com.yammer.metrics</pattern>
                  <shadedPattern>org.apache.flink.hbase.shaded.com.yammer.metrics</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.commons</pattern>
                  <shadedPattern>org.apache.flink.hbase.shaded.org.apache.commons</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.jute</pattern>
                  <shadedPattern>org.apache.flink.hbase.shaded.org.apache.jute</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>io.netty</pattern>
                  <shadedPattern>org.apache.flink.hbase.shaded.io.netty</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>org.apache.hadoop.hbase</pattern>
                  <shadedPattern>org.apache.flink.hbase.shaded.org.apache.hadoop.hbase</shadedPattern>
                  <excludes>
                    <exclude>org.apache.hadoop.hbase.codec.*</exclude>
                  </excludes>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.8.1</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>junit-jupiter-api</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-params</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
        <exclusion>
          <artifactId>junit-jupiter-engine</artifactId>
          <groupId>org.junit.jupiter</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.21.0</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
      <version>2.17.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
      <version>2.17.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>2.17.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-1.2-api</artifactId>
      <version>2.17.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.flink</groupId>
      <artifactId>flink-test-utils</artifactId>
      <version>1.18.1</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>guava</artifactId>
          <groupId>com.google.guava</groupId>
        </exclusion>
        <exclusion>
          <artifactId>metrics-core</artifactId>
          <groupId>io.dropwizard.metrics</groupId>
        </exclusion>
        <exclusion>
          <artifactId>flink-table-common</artifactId>
          <groupId>org.apache.flink</groupId>
        </exclusion>
        <exclusion>
          <artifactId>flink-test-utils-junit</artifactId>
          <groupId>org.apache.flink</groupId>
        </exclusion>
        <exclusion>
          <artifactId>flink-runtime</artifactId>
          <groupId>org.apache.flink</groupId>
        </exclusion>
        <exclusion>
          <artifactId>flink-core</artifactId>
          <groupId>org.apache.flink</groupId>
        </exclusion>
        <exclusion>
          <artifactId>flink-rpc-akka-loader</artifactId>
          <groupId>org.apache.flink</groupId>
        </exclusion>
        <exclusion>
          <artifactId>flink-clients</artifactId>
          <groupId>org.apache.flink</groupId>
        </exclusion>
        <exclusion>
          <artifactId>flink-streaming-java</artifactId>
          <groupId>org.apache.flink</groupId>
        </exclusion>
        <exclusion>
          <artifactId>flink-statebackend-rocksdb</artifactId>
          <groupId>org.apache.flink</groupId>
        </exclusion>
        <exclusion>
          <artifactId>flink-statebackend-changelog</artifactId>
          <groupId>org.apache.flink</groupId>
        </exclusion>
        <exclusion>
          <artifactId>flink-dstl-dfs</artifactId>
          <groupId>org.apache.flink</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
