<?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>google-cloud-testing</artifactId>
    <groupId>com.google.cloud</groupId>
    <version>0.72.0-alpha</version><!-- {x-version-update:google-cloud-testing:current} -->
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>google-cloud-bigtable-emulator</artifactId>
  <version>0.72.0-alpha</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>com.google.cloud</groupId>
        <artifactId>google-cloud-gcloud-maven-plugin</artifactId>
        <version>0.72.0-alpha</version><!-- {x-version-update:google-cloud-gcloud-maven-plugin:current} -->

        <executions>
          <execution>
            <id>gen-sources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>download</goal>
            </goals>
            <configuration>
              <componentNames>
                <componentName>bigtable-darwin-x86</componentName>
                <componentName>bigtable-darwin-x86_64</componentName>
                <componentName>bigtable-linux-x86</componentName>
                <componentName>bigtable-linux-x86_64</componentName>
                <componentName>bigtable-windows-x86</componentName>
                <componentName>bigtable-windows-x86_64</componentName>
              </componentNames>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.6</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>false</autoReleaseAfterClose>
          <skipNexusStagingDeployMojo>false</skipNexusStagingDeployMojo>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <!-- grpc deps are provided by the client -->
    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-core</artifactId>
      <version>1.13.1</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>io.grpc</groupId>
      <artifactId>grpc-netty-shaded</artifactId>
      <version>1.13.1</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.google.api</groupId>
      <artifactId>api-common</artifactId>
    </dependency>

    <!-- junit is optional because the emulator can be used w/o the junit Rule. -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>grpc-google-cloud-bigtable-v2</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.google.api.grpc</groupId>
      <artifactId>grpc-google-cloud-bigtable-admin-v2</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.3</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <links>
                <link>http://google.github.io/google-auth-library-java/releases/latest/apidocs/</link>
              </links>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
