<?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>com.facebook</groupId>
        <artifactId>facebook-oss-pom</artifactId>
        <version>11</version>
    </parent>

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

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

    <properties>
        <!-- Nifty actually can not build with the 1.6 compiler because -->
        <!-- it dependends on airlift, which is 1.7 only.               -->
        <!-- <project.build.targetJdk>1.6</project.build.targetJdk>     -->

        <dep.airlift.version>0.91</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.14.1</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>org.apache.thrift</groupId>
                <artifactId>libthrift</artifactId>
                <version>0.9.1</version>
            </dependency>

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

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

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpcore</artifactId>
                <version>4.2.4</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>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.code.findbugs</groupId>
                        <artifactId>jsr305</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

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

            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>1.1.0.Final</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <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>
                        </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>
            </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>
