<?xml version="1.0" encoding="UTF-8"?>
<!--

Copyright (C) 2012 Facebook, Inc.

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>

  <parent>
    <groupId>com.facebook</groupId>
    <artifactId>facebook-oss-pom</artifactId>
    <version>12</version>
  </parent>

  <groupId>com.facebook.jcommon</groupId>
  <artifactId>jcommon-parent</artifactId>
  <packaging>pom</packaging>
  <version>0.1.32</version>
  <name>java root</name>
  <description>common java libs</description>

  <url>https://facebook.github.com/${project.artifactId}</url>
  <inceptionYear>2012</inceptionYear>

  <properties>
    <testGroups>fast,slow</testGroups>
    <dep.jackson.version>2.7.4</dep.jackson.version>
    <dep.plugin.surefire.version>2.17</dep.plugin.surefire.version>

    <fb.check.fail-findbugs>false</fb.check.fail-findbugs>
    <fb.check.fail-pmd>false</fb.check.fail-pmd>
    <project.build.targetJdk>1.8</project.build.targetJdk>
    <dep.guava.version>21.0</dep.guava.version>
    <argLine />
  </properties>

  <scm>
    <connection>scm:git:git@github.com/facebook/jcommon.git</connection>
    <developerConnection>scm:git:git@github.com:facebook/jcommon.git</developerConnection>
    <url>https://github.com/facebook/jcommon</url>
    <tag>jcommon-parent-0.1.32</tag>
  </scm>

  <distributionManagement>
    <site>
      <id>github-project-site</id>
      <url>gitsite:git@github.com/facebook/jcommon.git</url>
    </site>
  </distributionManagement>

  <developers>
    <developer>
      <id>sr</id>
      <email>rash@fb.com</email>
      <timezone>-8</timezone>
    </developer>
    <developer>
      <id>ehwang</id>
      <email>ehwang@fb.com</email>
      <timezone>-8</timezone>
    </developer>
    <developer>
      <id>lif</id>
      <email>lif@fb.com</email>
      <timezone>-8</timezone>
    </developer>
    <developer>
      <id>timw</id>
      <email>timw@fb.com</email>
      <timezone>-8</timezone>
    </developer>
    <developer>
      <id>groys</id>
      <email>groys@fb.com</email>
      <timezone>-8</timezone>
    </developer>
    <developer>
      <id>martint</id>
      <email>martint@fb.com</email>
      <timezone>-8</timezone>
    </developer>
    <developer>
      <id>dain</id>
      <email>dain@fb.com</email>
      <timezone>-8</timezone>
    </developer>
    <developer>
      <id>alessandro</id>
      <email>alessandro@fb.com</email>
      <timezone>-8</timezone>
    </developer>
  </developers>

  <profiles>
    <profile>
      <id>jenkins</id>
      <activation>
        <property>
          <name>env.BUILD_NUMBER</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <!--<groupId>org.codehaus.mojo</groupId>-->
            <!--<artifactId>cobertura-maven-plugin</artifactId>-->
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>fb</id>
      <properties>
        <fb.check.fail-license>false</fb.check.fail-license>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1.2</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.7</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
            <executions>
              <execution>
                <phase>none</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>fast</id>
      <properties>
        <testGroups>fast</testGroups>
      </properties>
    </profile>
  </profiles>

  <!--aggregator only project; includes upload info -->
  <modules>
    <module>util</module>
    <module>data</module>
    <module>collections</module>
    <module>collections-foundation</module>
    <module>config</module>
    <module>logging</module>
    <module>lifecycle</module>
    <module>concurrency</module>
    <module>stats</module>
    <module>concurrent-stats</module>
    <module>tools</module>
    <module>zookeeper</module>
    <module>memory</module>
    <module>jcommon-all</module>
    <module>testing</module>
    <module>logging-log4j</module>
    <module>logging-util</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <!--jcommon internal-->
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>collections</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>collections-foundation</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>concurrency</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>concurrent-stats</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>config</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>data</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>lifecycle</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>logging</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>logging-log4j</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>logging-util</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>memory</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>stats</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>tools</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>util</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>zookeeper</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>testing</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.facebook.jcommon</groupId>
        <artifactId>jcommon-all</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!--third party-->
      <dependency>
        <groupId>com.github.ben-manes.caffeine</groupId>
        <artifactId>caffeine</artifactId>
        <version>2.2.1</version>
      </dependency>
      <dependency>
        <groupId>colt</groupId>
        <artifactId>colt</artifactId>
        <version>1.2.0</version>
      </dependency>
      <dependency>
        <groupId>net.sf.trove4j</groupId>
        <artifactId>trove4j</artifactId>
        <version>3.0.3</version>
      </dependency>
      <dependency>
        <groupId>org.json</groupId>
        <artifactId>json</artifactId>
        <version>20090211</version>
      </dependency>
      <dependency>
        <groupId>org.apache.zookeeper</groupId>
        <artifactId>zookeeper</artifactId>
        <version>3.3.5</version>
        <exclusions>
          <exclusion>
            <artifactId>junit</artifactId>
            <groupId>junit</groupId>
          </exclusion>
        </exclusions>
      </dependency>
      <dependency>
        <groupId>commons-cli</groupId>
        <artifactId>commons-cli</artifactId>
        <version>1.2</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-guava</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-joda</artifactId>
        <version>${dep.jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>org.iq80.snappy</groupId>
        <artifactId>snappy</artifactId>
        <version>0.2</version>
      </dependency>
      <dependency>
        <groupId>com.google.code.findbugs</groupId>
        <artifactId>annotations</artifactId>
        <version>2.0.2</version>
      </dependency>
      <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>2.9.4</version>
      </dependency>

      <!--test-->
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-all</artifactId>
        <version>1.9.0</version>
      </dependency>
      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.1.1</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.10</version>
          <configuration>
            <ignoredDependencies>
              <ignoredDependency>com.google.code.findbugs:jsr305</ignoredDependency>
              <ignoredDependency>com.google.code.findbugs:annotations</ignoredDependency>
            </ignoredDependencies>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <configuration>
            <includes>
              <include>src/**</include>
            </includes>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <groups>${testGroups}</groups>
            <forkCount>0.5C</forkCount>
            <reuseForks>true</reuseForks>
            <redirectTestOutputToFile>true</redirectTestOutputToFile>
            <trimStackTrace>false</trimStackTrace>
            <forkedProcessTimeoutInSeconds>60</forkedProcessTimeoutInSeconds>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-pmd-plugin</artifactId>
          <executions>
            <execution>
              <phase>none</phase>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <executions>
            <execution>
              <phase>none</phase>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>2.2</version>
          <executions>
            <execution>
              <phase>package</phase>
              <goals>
                <goal>shade</goal>
              </goals>
              <configuration>
                <shadedArtifactAttached>true</shadedArtifactAttached>
                <shadedClassifierName>standalone</shadedClassifierName>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <executions>
            <execution>
              <phase>none</phase>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
</project>
