<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 Google Inc. All Rights Reserved.
 
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<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.bigtable</groupId>
    <artifactId>bigtable-client-parent</artifactId>
    <version>1.4.0</version>
    <packaging>pom</packaging>
    <name>${project.groupId}:${project.artifactId}</name>
    <url>https://cloud.google.com/bigtable/</url>
    <description>
        This is a client to access Cloud Bigtable (https://cloud.google.com/bigtable/) via the HBase APIs.
    </description>
    <!-- TODO: improve the description -->

    <licenses>
        <license>
            <name>The Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <modules>
        <module>bigtable-client-core-parent</module>
        <module>bigtable-hbase-parent</module>
        <module>bigtable-hbase-2.x-parent</module>
        <module>bigtable-dataflow-parent</module>
        <module>bigtable-test</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <compileSource>1.7</compileSource>
        <compileSource.1.8>1.8</compileSource.1.8>

        <!-- core dependency versions -->
        <dropwizard.metrics.version>3.1.2</dropwizard.metrics.version>
        <slf4j.version>1.7.7</slf4j.version>
        <commons-lang.version>2.6</commons-lang.version>
        <commons-logging.version>1.2</commons-logging.version>
        <google-auto-service.version>1.0-rc2</google-auto-service.version>
        <auto-value.version>1.1</auto-value.version>
        <jsr305.version>3.0.2</jsr305.version>
        <hamcrest.version>1.3</hamcrest.version>

        <!-- google-cloud-java related dependency versions -->
        <google-cloud.version>0.50.0-alpha</google-cloud.version>
        <opencensus.version>0.11.1</opencensus.version>
        <guava.version>20.0</guava.version>

        <!-- hbase dependency versions -->
        <hbase.version.1>1.4.3</hbase.version.1>
        <hbase.version.2>2.0.0</hbase.version.2>
        <hbase.version>${hbase.version.1}</hbase.version>
        <hadoop.version>2.7.4</hadoop.version>

        <!-- testing dependency versions -->
        <junit.version>4.12</junit.version>
        <mockito.version>1.10.19</mockito.version>

        <beam.version>2.4.0</beam.version>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>Apache Snapshots Repository</id>
            <url>https://repository.apache.org/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>Sonatype Snapshots Repository</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
    </repositories>

    <scm>
        <connection>scm:git:https://github.com/GoogleCloudPlatform/cloud-bigtable-client.git</connection>
        <url>scm:git:https://github.com/GoogleCloudPlatform/cloud-bigtable-client.git</url>
        <developerConnection>scm:git:https://github.com/GoogleCloudPlatform/cloud-bigtable-client.git</developerConnection>
        <tag>bigtable-client-1.4.0</tag>
    </scm>

    <developers>
       <developer>
         <organization>Google</organization>
         <organizationUrl>http://www.google.com</organizationUrl>
       </developer>
    </developers>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/GoogleCloudPlatform/cloud-bigtable-client/issues</url>
    </issueManagement>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <!-- enable system property substitution. -->
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.5.1</version>
                    <configuration>
                        <source>${compileSource}</source>
                        <target>${compileSource}</target>
                        <showWarnings>true</showWarnings>
                        <showDeprecation>false</showDeprecation>
                        <compilerArgument>-Xlint:-options</compilerArgument>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.19.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.19.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
               <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-eclipse-plugin</artifactId>
                    <version>2.10</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.4</version>
                    <configuration>
                        <windowtitle>Cloud Bigtable HBase Client for Java ${project.version} API</windowtitle>
                        <doctitle>Cloud Bigtable HBase Client for Java ${project.version} API</doctitle>
                        <overview>../overview.html</overview>
                        <bottom><![CDATA[<br>]]></bottom>

                        <offlineLinks>
                            <offlineLink>
                                <url>http://google.github.io/guava/releases/19.0/api/docs/</url>
                                <location>${basedir}/javadoc/guava-docs</location>
                            </offlineLink>
                            <offlineLink>
                                <url>https://hbase.apache.org/devapidocs/</url>
                                <location>${basedir}/javadoc/hbase-docs</location>
                            </offlineLink>
                            <offlineLink>
                                <url>http://atetric.com/atetric/javadoc/com.google.protobuf/protobuf-java/3.0.2/</url>
                                <location>${basedir}/javadoc/protobuf-docs</location>
                            </offlineLink>
                        </offlineLinks>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <phase>package</phase>
                            <configuration>
                                <!--
                                javadoc excluded packages:
                                    com.google.clooud.*                             (Ignore, a hack/workaround for separate maven issue)
                                -->
                                <excludePackageNames>com.google.clooud</excludePackageNames>
                            </configuration>
                        </execution>
                        <execution>
                            <id>default-cli</id>
                            <configuration>
                                <!--
                                javadoc excluded packages:
                                    com.google.cloud.bigtable.dataflow{import,}     (Breaks with javadoc:aggregate, handled separately)
                                    com.google.clooud.*                             (Ignore, a hack/workaround for separate maven issue)
                                -->
                                <excludePackageNames>com.google.cloud.bigtable.dataflow:com.google.cloud.bigtable.dataflowimport:com.google.clooud</excludePackageNames>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <profiles>
        <profile>
            <id>doclint-java8-disable</id>
            <activation>
                <property>
                    <name>!doclint</name>
                </property>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <additionalparam>-Xdoclint:none</additionalparam>
            </properties>
        </profile>
        <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</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>false</autoReleaseAfterClose>
                        </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>
