<?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.8.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>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce</id>
            <configuration>
              <skip>true</skip>
            </configuration>
          </execution>
          <execution>
            <id>enforce-version-consistency-slf4j</id>
            <configuration>
              <skip>true</skip>
            </configuration>
          </execution>
          <execution>
            <id>enforce-banned-deps</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <skip>true</skip>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>2.0.0</version>
        <executions>
          <execution>
            <id>default-cli</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>add-third-party</goal>
            </goals>
            <configuration>
              <excludedScopes>test,provided,system</excludedScopes>
              <includedArtifacts>com.google.cloud.bigtable:bigtable-hbase-2.x-shaded</includedArtifacts>
              <generateBundle>true</generateBundle>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <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>
              <relocations>
                <relocation>
                  <pattern>org.apache.hadoop.hbase.shaded.com.google.protobuf</pattern>
                  <shadedPattern>com.google.protobuf</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.google.cloud.bigtable.test</groupId>
        <artifactId>bigtable-build-helper</artifactId>
        <version>2.8.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/BigtableAsyncRegistry</classEntry>
                <classEntry>org/apache/hadoop/hbase/client/CommonConnection</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</id>
            <phase>verify</phase>
            <goals>
              <goal>verify-mirror-deps</goal>
            </goals>
            <configuration>
              <targetDependencies>
                <targetDependency>org.apache.hbase:hbase-client:${hbase2.version}</targetDependency>
              </targetDependencies>
              <ignoredDependencies>
                <ignoredDependency>commons-logging:commons-logging</ignoredDependency>
              </ignoredDependencies>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <configuration>
          <ignoredDependencies>
            <dependency>*</dependency>
          </ignoredDependencies>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>clirr-maven-plugin</artifactId>
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-client</artifactId>
      <version>2.3.6</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>io.dropwizard.metrics</groupId>
      <artifactId>metrics-core</artifactId>
      <version>3.2.6</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.30</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.conscrypt</groupId>
      <artifactId>conscrypt-openjdk-uber</artifactId>
      <version>2.5.2</version>
      <scope>runtime</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>
  <properties>
    <hbase2-hadoop-slf4j.version>1.7.30</hbase2-hadoop-slf4j.version>
  </properties>
</project>
