<?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">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.google.cloud</groupId>
  <artifactId>google-cloud-bigtable-emulator</artifactId>
  <version>0.74.0-alpha</version><!-- {x-version-update:google-cloud-bigtable-emulator:current} -->
  <name>Google Cloud Java - Bigtable Emulator</name>
  <url>https://github.com/googleapis/google-cloud-java</url>
  <description>
    A Java wrapper for the Cloud Bigtable emulator.
  </description>
  <scm>
    <connection>scm:git:git@github.com:googleapis/google-cloud-java.git</connection>
    <developerConnection>scm:git:git@github.com:googleapis/google-cloud-java.git</developerConnection>
    <url>https://github.com/googleapis/google-cloud-java</url>
    <tag>HEAD</tag>
  </scm>

  <developers>
    <developer>
      <id>igorberstein</id>
      <name>Igor Bernstein</name>
      <email>igorbernstein@google.com</email>
      <organization>Google</organization>
      <roles>
        <role>Developer</role>
      </roles>
    </developer>
  </developers>

  <properties>
    <site.installationModule>google-cloud-testing</site.installationModule>
  </properties>

  <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>
  <licenses>
    <license>
      <name>Apache-2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.7.0</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
          <encoding>UTF-8</encoding>
          <compilerArgument>-Xlint:unchecked</compilerArgument>
          <compilerArgument>-Xlint:deprecation</compilerArgument>
          <showDeprecation>true</showDeprecation>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.google.cloud</groupId>
        <artifactId>google-cloud-gcloud-maven-plugin</artifactId>
        <version>0.74.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.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.4</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.7</version>
      </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>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.cloud</groupId>
        <artifactId>google-cloud-bom</artifactId>
        <version>0.74.0-alpha</version><!-- {x-version-update:google-cloud-bom:current} -->
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <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>
      <version>4.12</version>
      <scope>compile</scope>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>com.google.truth</groupId>
      <artifactId>truth</artifactId>
      <version>0.30</version>
      <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>3.0.1</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>
              <doclint>none</doclint>
            </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>
