<?xml version="1.0"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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.dispalt.vitess</groupId>
    <artifactId>vitess-parent</artifactId>
    <version>1.2.0</version>
    <packaging>pom</packaging>
    <url>https://github.com/youtube/vitess/</url>
    <name>Youtube Vitess</name>
    <description>Umbrella project for all Java activities for Vitess</description>
    <inceptionYear>2014</inceptionYear>
    <modules>
        <module>client</module>
        <module>example</module>
        <module>grpc-client</module>
        <module>hadoop</module>
        <module>jdbc</module>
    </modules>

    <organization>
        <name>YouTube</name>
        <url>https://www.youtube.com</url>
    </organization>
    <developers>
        <developer>
            <id>timofeyb</id>
            <name>Timothy Basanov</name>
        </developer>
        <developer>
            <id>GarethCOliver</id>
            <name>Gareth Oliver</name>
        </developer>
        <developer>
            <id>anandhenry</id>
            <name>Anand Henry</name>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>BSD-style license</name>
            <url>https://github.com/youtube/vitess/blob/master/LICENSE</url>
            <distribution>manual</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:git@github.com:youtube/vitess.git</connection>
        <developerConnection>
            scm:git:git@github.com:youtube/vitess.git
        </developerConnection>
        <url>git@github.com:youtube/vitess.git</url>
    </scm>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/youtube/vitess/issues</url>
    </issueManagement>
    <mailingLists>
        <mailingList>
            <archive>https://groups.google.com/forum/#!forum/vitess</archive>
        </mailingList>
    </mailingLists>

    <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <grpc.version>1.1.2</grpc.version>
      <guava.version>19.0</guava.version>
      <junit.version>4.12</junit.version>
      <log4j.version>1.2.17</log4j.version>
      <protobuf.java.version>3.0.0</protobuf.java.version>
    </properties>

    <!-- define dependency versions -->
    <dependencies>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>${protobuf.java.version}</version>
      </dependency>
    </dependencies>

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

    <build>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.3</version>
          <configuration>
            <source>1.7</source>
            <target>1.7</target>
          </configuration>
        </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>true</autoReleaseAfterClose>
          </configuration>
        </plugin>
      </plugins>
    </build>

    <profiles>
      <profile> 
        <id>release</id>
        <build>
          <plugins>
            <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>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-source-plugin</artifactId>
              <version>2.2.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>
                  <configuration>
                    <failOnError>false</failOnError>
                  </configuration>
                </execution>
              </executions>
            </plugin>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-deploy-plugin</artifactId>
              <version>2.7</version>
              <configuration>
                  <skip>true</skip>
              </configuration>
            </plugin>
          </plugins>
        </build>
      </profile>
    </profiles>

</project>
