<?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>11</version>
  </parent>

  <groupId>com.facebook.swift</groupId>
  <artifactId>swift-root</artifactId>
  <version>0.14.2</version>
  <packaging>pom</packaging>
  <name>${project.artifactId}</name>
  <description>Annotation based Thrift implementation</description>

  <scm>
    <connection>scm:git:git://github.com/facebook/swift.git</connection>
    <developerConnection>scm:git:git@github.com:facebook/swift.git</developerConnection>
    <url>https://github.com/facebook/swift</url>
    <tag>swift-root-0.14.2</tag>
  </scm>

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

  <modules>
    <module>swift-annotations</module>
    <module>swift-codec</module>
    <module>swift-idl-parser</module>
    <module>swift-javadoc</module>
    <module>swift-service</module>
    <module>swift-generator</module>
    <module>swift-generator-cli</module>
    <module>swift-maven-plugin</module>
    <module>swift-load-generator</module>
    <module>swift2thrift-generator-cli</module>
  </modules>

  <inceptionYear>2012</inceptionYear>

  <developers>
    <developer>
      <id>dain</id>
      <name>Dain Sundstrom</name>
      <email>dain@fb.com</email>
    </developer>
  </developers>

  <properties>
    <!-- This actually wants to be fixed -->
    <fb.check.fail-findbugs>false</fb.check.fail-findbugs>

    <dep.airlift.version>0.91</dep.airlift.version>
    <dep.antlr.version>3.5</dep.antlr.version>
    <dep.maven-api.version>2.2.1</dep.maven-api.version>
    <dep.fb.nifty.version>0.14.1</dep.fb.nifty.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.facebook.swift</groupId>
        <artifactId>swift-annotations</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.facebook.swift</groupId>
        <artifactId>swift-codec</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.facebook.swift</groupId>
        <artifactId>swift-idl-parser</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.facebook.swift</groupId>
        <artifactId>swift-service</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>com.facebook.swift</groupId>
        <artifactId>swift-generator</artifactId>
        <version>${project.version}</version>
      </dependency>

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

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

      <dependency>
        <groupId>org.ow2.asm</groupId>
        <artifactId>asm-all</artifactId>
        <version>4.1</version>
      </dependency>

      <dependency>
        <groupId>com.facebook.nifty</groupId>
        <artifactId>nifty-core</artifactId>
        <version>${dep.fb.nifty.version}</version>
      </dependency>

      <dependency>
        <groupId>com.facebook.nifty</groupId>
        <artifactId>nifty-client</artifactId>
        <version>${dep.fb.nifty.version}</version>
      </dependency>

      <dependency>
        <groupId>io.airlift</groupId>
        <artifactId>jmx</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>stats</artifactId>
        <version>${dep.airlift.version}</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>
            <!-- Swift uses a newer version named io.netty:netty -->
            <groupId>org.jboss.netty</groupId>
            <artifactId>netty</artifactId>
          </exclusion>
          <exclusion>
            <!-- Swift uses a newer version named org.ow2.asm:asm-all -->
            <groupId>asm</groupId>
            <artifactId>asm</artifactId>
          </exclusion>
          <exclusion>
            <!-- Swift doesn't use this and it causes META-INF content conflicts with jsr-303 -->
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

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

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

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

      <dependency>
        <groupId>org.weakref</groupId>
        <artifactId>jmxutils</artifactId>
        <version>1.16</version>
      </dependency>

      <dependency>
        <groupId>com.thoughtworks.paranamer</groupId>
        <artifactId>paranamer</artifactId>
        <version>2.5.2</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>org.antlr</groupId>
        <artifactId>antlr-runtime</artifactId>
        <version>${dep.antlr.version}</version>
      </dependency>

      <dependency>
        <groupId>org.antlr</groupId>
        <artifactId>stringtemplate</artifactId>
        <version>4.0.2</version>
      </dependency>

      <!-- maven -->
      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-plugin-api</artifactId>
        <version>${dep.maven-api.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-model</artifactId>
        <version>${dep.maven-api.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-artifact</artifactId>
        <version>${dep.maven-api.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>${dep.maven-api.version}</version>
        <exclusions>
          <exclusion>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <dependency>
        <groupId>com.pyx4j</groupId>
        <artifactId>maven-plugin-log4j</artifactId>
        <version>1.0.1</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-utils</artifactId>
        <version>1.5.15</version>
      </dependency>

      <dependency>
        <groupId>org.easytesting</groupId>
        <artifactId>fest-assert</artifactId>
        <version>1.4</version>
      </dependency>

      <dependency>
        <groupId>args4j</groupId>
        <artifactId>args4j</artifactId>
        <version>2.0.22</version>
      </dependency>

      <dependency>
        <groupId>com.beust</groupId>
        <artifactId>jcommander</artifactId>
        <version>1.30</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-maven-plugin</artifactId>
                    <versionRange>[0,)</versionRange>
                    <goals>
                      <goal>descriptor</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.antlr</groupId>
          <artifactId>antlr3-maven-plugin</artifactId>
          <version>${dep.antlr.version}</version>
          <executions>
            <execution>
              <id>default</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>antlr</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-maven-plugin</artifactId>
          <version>1.3.8</version>
          <executions>
            <execution>
              <goals>
                <goal>descriptor</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>3.2</version>
          <executions>
            <execution>
              <id>help-mojo</id>
              <goals>
                <goal>helpmojo</goal>
              </goals>
            </execution>
          </executions>
        </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>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <configuration>
            <rules>
              <bannedDependencies>
                <!--
                    Ban io.airlift:log except in tests, since it bridges from
                    jul and log4j back to slf4j, which would prevent consumers
                    of swift from choosing those logging implementations
                -->
                <excludes combine.children="append">
                  <exclude>io.airlift:log:*:*:*</exclude>
                </excludes>
                <includes combine.children="append">
                  <exclude>io.airlift:log:*:*:test</exclude>
                </includes>
              </bannedDependencies>
            </rules>
          </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>
