<?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/xsd/maven-4.0.0.xsd">
  <parent>
    <artifactId>bigtable-hbase-1.x-parent</artifactId>
    <groupId>com.google.cloud.bigtable</groupId>
    <version>2.0.0-alpha2</version> <!-- {x-version-update:bigtable-client-parent:current} -->
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <properties>
    <mainclass>com.google.cloud.bigtable.hbase.tools.HBaseSchemaTranslator</mainclass>
  </properties>
  <artifactId>bigtable-hbase-1.x-tools</artifactId>

  <name>${project.groupId}:${project.artifactId}</name>
  <description>
    This project contains tools for migrating to Cloud Bigtable from HBase 1.x.
  </description>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>bigtable-hbase-1.x-shaded</artifactId>
      <version>2.0.0-alpha2</version> <!-- {x-version-update:bigtable-client-parent:current} -->
      <exclusions>
        <!-- Workaround MNG-5899 & MSHADE-206. Maven >= 3.3.0 doesn't use the dependency reduced
       pom.xml files when invoking the build from a parent project. So we have to manually exclude
       the dependencies. Note that this works in conjunction with the manually promoted dependencies
       in bigtable-hbase-1.x-shaded/pom.xml -->
        <exclusion>
          <groupId>${project.groupId}</groupId>
          <artifactId>bigtable-hbase-1.x</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.google.cloud.bigtable</groupId>
          <artifactId>bigtable-metrics-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>io.opencensus</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>io.grpc</groupId>
          <artifactId>grpc-census</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.hbase</groupId>
      <artifactId>hbase-shaded-client</artifactId>
      <version>${hbase1.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>30.1.1-jre</version>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>${slf4j.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.2</version>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>
                ${mainclass}
              </mainClass>
            </manifest>
          </archive>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>single</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>
                ${mainclass}
              </mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>