<?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>bigtable-hbase-2.x-parent</artifactId>
    <groupId>com.google.cloud.bigtable</groupId>
    <version>2.14.1</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>bigtable-hbase-2.x-hadoop</artifactId>
  <description>Bigtable connector compatible with HBase 2.x. It most of its dependencies
    (hbase &amp; grpc). Its mainly intended to be used by dataflow 2.x to avoid
    version conflicts with grpc &amp; protobuf. Prefer to use
    bigtable-hbase-2.x.</description>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <executions>
            <execution>
              <id>enforce</id>
              <configuration>
                <skip>true</skip>
              </configuration>
            </execution>
            <execution>
              <id>enforce-banned-deps</id>
              <configuration>
                <skip>true</skip>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
            <configuration>
              <shadedArtifactAttached>false</shadedArtifactAttached>
              <createDependencyReducedPom>true</createDependencyReducedPom>
              <promoteTransitiveDependencies>false</promoteTransitiveDependencies>
              <transformers>
                <transformer />
                <transformer />
                <transformer />
              </transformers>
              <filters>
                <filter>
                  <artifact>*:*</artifact>
                  <excludes>
                    <exclude>META-INF/*.SF</exclude>
                    <exclude>META-INF/*.DSA</exclude>
                    <exclude>META-INF/*.RSA</exclude>
                  </excludes>
                </filter>
              </filters>
              <artifactSet>
                <includes>
                  <include>com.google.cloud.bigtable:bigtable-hbase-2.x-shaded</include>
                </includes>
              </artifactSet>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.google.cloud.bigtable.test</groupId>
        <artifactId>bigtable-build-helper</artifactId>
        <version>2.14.1</version>
        <executions>
          <execution>
            <id>verify-shaded-jar-entries</id>
            <phase>verify</phase>
            <goals>
              <goal>verify-shaded-jar-entries</goal>
            </goals>
            <configuration>
              <allowedJarClassEntries>
                <classEntry>com/google/bigtable</classEntry>
                <classEntry>com/google/cloud/bigtable</classEntry>
                <classEntry>org/apache/hadoop/hbase/client/AbstractBigtableAdmin</classEntry>
                <classEntry>org/apache/hadoop/hbase/client/AbstractBigtableConnection</classEntry>
                <classEntry>org/apache/hadoop/hbase/client/BigtableAsyncConnection</classEntry>
                <classEntry>org/apache/hadoop/hbase/client/BigtableConnectionRegistry</classEntry>
                <classEntry>org/apache/hadoop/hbase/client/BigtableAsyncRegistry</classEntry>
                <classEntry>org/apache/hadoop/hbase/client/CommonConnection</classEntry>
                <classEntry>META-INF/versions/9/com/google/cloud/bigtable/repackaged</classEntry>
              </allowedJarClassEntries>
            </configuration>
          </execution>
          <execution>
            <id>verify-shaded-exclusions</id>
            <phase>verify</phase>
            <goals>
              <goal>verify-shaded-exclusions</goal>
            </goals>
          </execution>
          <execution>
            <id>verify-mirror-deps-hbase</id>
            <phase>verify</phase>
            <goals>
              <goal>verify-mirror-deps</goal>
            </goals>
            <configuration>
              <targetDependencies>
                <targetDependency>org.apache.hbase:hbase-client</targetDependency>
              </targetDependencies>
              <ignoredDependencies>
                <dependency>log4j:log4j</dependency>
              </ignoredDependencies>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-client</artifactId>
      <version>2.5.7-hadoop3</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <artifactId>hamcrest-core</artifactId>
          <groupId>org.hamcrest</groupId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
