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

    Copyright (C) 2012-2013 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>io.airlift</groupId>
        <artifactId>airbase</artifactId>
        <version>46</version>
        <relativePath />
    </parent>

    <groupId>com.facebook.nifty</groupId>
    <artifactId>nifty-parent</artifactId>
    <version>0.19.0</version>
    <packaging>pom</packaging>

    <modules>
        <module>nifty-core</module>
        <module>nifty-client</module>
        <module>nifty-examples</module>
        <module>nifty-load-tester</module>
    </modules>

    <properties>
        <air.check.skip-findbugs>true</air.check.skip-findbugs>
        <air.check.skip-pmd>true</air.check.skip-pmd>
        <air.check.skip-jacoco>true</air.check.skip-jacoco>

        <dep.airlift.version>0.119</dep.airlift.version>
    </properties>

    <url>https://facebook.github.com/nifty</url>
    <inceptionYear>2012</inceptionYear>

    <developers>
        <developer>
            <id>jaxlaw</id>
            <name>Jax Law</name>
            <email>jaxlaw@fb.com</email>
        </developer>
        <developer>
            <id>andrewcox</id>
            <name>Andrew Cox</name>
            <email>andrewcox@fb.com</email>
        </developer>
    </developers>

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

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

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.facebook.nifty</groupId>
                <artifactId>nifty-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.facebook.nifty</groupId>
                <artifactId>nifty-client</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.facebook.nifty</groupId>
                <artifactId>nifty-examples</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.facebook.nifty</groupId>
                <artifactId>nifty-load-tester</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>4.0</version>
            </dependency>

            <dependency>
                <groupId>com.google.inject.extensions</groupId>
                <artifactId>guice-multibindings</artifactId>
                <version>4.0</version>
            </dependency>

            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>1.9</version>
            </dependency>

            <dependency>
                <groupId>commons-beanutils</groupId>
                <artifactId>commons-beanutils</artifactId>
                <version>1.9</version>
            </dependency>

            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging</artifactId>
                <version>1.2</version>
            </dependency>

            <dependency>
                <groupId>org.apache.thrift</groupId>
                <artifactId>libthrift</artifactId>
                <version>0.9.3</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty</artifactId>
                <version>3.10.5.Final</version>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.4.1</version>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpcore</artifactId>
                <version>4.4.1</version>
            </dependency>

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>units</artifactId>
                <version>${dep.airlift.version}</version>
            </dependency>

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>bootstrap</artifactId>
                <version>${dep.airlift.version}</version>
            </dependency>

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>configuration</artifactId>
                <version>${dep.airlift.version}</version>
            </dependency>

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>log</artifactId>
                <version>${dep.airlift.version}</version>
            </dependency>

            <dependency>
                <groupId>org.easymock</groupId>
                <artifactId>easymock</artifactId>
                <version>3.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration combine.children="append">
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <systemPropertyVariables>
                            <java.util.logging.SimpleFormatter.format>%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$s %5$s%6$s%n</java.util.logging.SimpleFormatter.format>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>

                <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>
                        </execution>
                    </executions>
                </plugin>

                <!-- Configure findbugs plugin to skip checking of thrift-generated files -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <configuration>
                        <!--
                            NOTE: It would make more sense to have an exclude filter file per sub-module
                            but findbugs-maven-plugin has a bug that it will continue using the first
                            filter file it saw for the rest of the mvn process (even in different sub-modules).
                        -->
                        <excludeFilterFile>src/findbugs/findbugs-exclude-filter.xml</excludeFilterFile>
                    </configuration>
                </plugin>
                <plugin>
                  <groupId>com.ning.maven.plugins</groupId>
                  <artifactId>maven-duplicate-finder-plugin</artifactId>
                  <configuration>
                    <exceptions>
                      <exception>
                        <conflictingDependencies>
                          <dependency>
                            <groupId>commons-beanutils</groupId>
                            <artifactId>commons-beanutils</artifactId>
                          </dependency>
                          <dependency>
                            <groupId>commons-beanutils</groupId>
                            <artifactId>commons-beanutils-core</artifactId>
                          </dependency>
                          <dependency>
                            <groupId>commons-collections</groupId>
                            <artifactId>commons-collections</artifactId>
                          </dependency>
                        </conflictingDependencies>
                        <!-- Well done, Apache! -->
                        <classes>
                          <class>org.apache.commons.collections.ArrayStack</class>
                          <class>org.apache.commons.collections.Buffer</class>
                          <class>org.apache.commons.collections.BufferUnderflowException</class>
                          <class>org.apache.commons.collections.FastHashMap</class>
                        </classes>
                        <!-- <packages> -->
                        <!--   <package>org.apache.commons.beanutils</package> -->
                        <!-- </packages> -->
                      </exception>
                    </exceptions>
                  </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <properties>
                        <inceptionYear>${project.inceptionYear}</inceptionYear>
                        <year>2013</year>
                    </properties>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
