<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <artifactId>firebase-client</artifactId>
  <name>Firebase Java Client</name>
  <description>Firebase Java Client</description>
  <groupId>com.firebase</groupId>
  <version>2.2.2</version>
  <packaging>pom</packaging>
  <organization>
    <name>Firebase</name>
    <url>https://www.firebase.com/</url>
  </organization>
  <licenses>
    <license>
      <name>Commercial</name>
      <url>https://www.firebase.com/terms/terms-of-service.html</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>firebase</id>
      <name>Firebase</name>
      <email>support@firebase.com</email>
      <url>https://firebase.com/</url>
      <organization>Firebase</organization>
      <organizationUrl>https://firebase.com/</organizationUrl>
      <roles>
        <role>architect</role>
        <role>developer</role>
      </roles>
      <timezone>-8</timezone>
    </developer>
  </developers>
  <url>https://www.firebase.com/docs/java-quickstart.html</url>
  <scm>
    <connection>scm:git:git@github.com:firebase/firebase-client-jvm.git</connection>
    <developerConnection>scm:git:git@github.com:firebase/firebase-client-jvm.git</developerConnection>
    <url>https://github.com/firebase/firebase-client-jvm</url>
    <tag>Java-v2.2.2</tag>
  </scm>
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  <properties>
    <tagNameFormat>Java-v@{project.version}</tagNameFormat>
    <project.java.version>1.6</project.java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  <modules>
    <module>jvm</module>
    <module>android</module>
  </modules>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>${project.java.version}</source>
          <target>${project.java.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <version>1.0.0-beta-2</version>
        <configuration>
          <flattenMode>minimum</flattenMode>
        </configuration>
        <executions>
          <!-- enable flattening -->
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
          <!-- ensure proper cleanup -->
          <execution>
            <id>flatten.clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <inherited>true</inherited>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
            </manifest>
          </archive>
        </configuration>
        <executions>
          <execution>
            <id>default-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <excludes>
                <exclude>android/**/*</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.4.2</version>
        <configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <useReleaseProfile>true</useReleaseProfile>
          <arguments>-DskipTests</arguments>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>standalone</id>
      <activation>
        <property>
          <name>standalone</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.1</version>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <createDependencyReducedPom>false</createDependencyReducedPom>
                  <relocations>
                    <relocation>
                      <pattern>org.apache</pattern>
                      <shadedPattern>org.shaded.apache</shadedPattern>
                    </relocation>
                    <relocation>
                      <pattern>com.fasterxml.jackson</pattern>
                      <shadedPattern>com.shaded.fasterxml.jackson</shadedPattern>
                    </relocation>
                  </relocations>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>nexus</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
