<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.facebook.airlift</groupId>
        <artifactId>airbase</artifactId>
        <version>107</version>
    </parent>

    <groupId>com.facebook.drift</groupId>
    <artifactId>drift-root</artifactId>
    <version>1.45</version>
    <packaging>pom</packaging>

    <name>drift-root</name>
    <description>Annotation based Thrift implementation</description>
    <url>https://github.com/prestodb/drift</url>

    <scm>
        <connection>scm:git:git://github.com/airlift/drift.git</connection>
        <url>https://github.com/prestodb/drift</url>
        <tag>1.45</tag>
    </scm>

    <modules>
        <module>drift-api</module>
        <module>drift-protocol</module>
        <module>drift-codec</module>
        <module>drift-client</module>
        <module>drift-idl-generator</module>
        <module>drift-integration-tests</module>
        <module>drift-javadoc</module>
        <module>drift-maven-plugin</module>
        <module>drift-server</module>
        <module>drift-transport-apache</module>
        <module>drift-transport-netty</module>
        <module>drift-transport-spi</module>
        <module>drift-codec-utils</module>
    </modules>

    <inceptionYear>2012</inceptionYear>

    <developers>
        <!-- see git log -->
    </developers>

    <properties>
        <air.license.header-file>license/apache-copyright-header.txt</air.license.header-file>

        <!-- This actually wants to be fixed -->
        <air.check.skip-pmd>true</air.check.skip-pmd>
        <air.check.skip-jacoco>true</air.check.skip-jacoco>

        <dep.airlift.version>0.186</dep.airlift.version>
        <dep.takari-plugin.version>2.9.1</dep.takari-plugin.version>
        <dep.maven.version>3.5.3</dep.maven.version>

        <dep.nexus-staging-plugin.version>1.6.8</dep.nexus-staging-plugin.version>

        <dep.netty.version>4.1.115.Final</dep.netty.version>
        <dep.central-publishing.version>0.8.0</dep.central-publishing.version>
    </properties>

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

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

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

            <dependency>
                <groupId>com.facebook.drift</groupId>
                <artifactId>drift-client</artifactId>
                <version>${project.version}</version>
            </dependency>

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

            <dependency>
                <groupId>com.facebook.drift</groupId>
                <artifactId>drift-protocol</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.facebook.drift</groupId>
                <artifactId>drift-server</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.facebook.drift</groupId>
                <artifactId>drift-transport-apache</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.facebook.drift</groupId>
                <artifactId>drift-transport-netty</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>com.facebook.drift</groupId>
                <artifactId>drift-transport-spi</artifactId>
                <version>${project.version}</version>
            </dependency>

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

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

            <dependency>
                <groupId>com.facebook.airlift</groupId>
                <artifactId>concurrent</artifactId>
                <version>${dep.airlift.version}</version>
            </dependency>

            <dependency>
                <groupId>com.facebook.airlift</groupId>
                <artifactId>jmx</artifactId>
                <version>${dep.airlift.version}</version>
            </dependency>

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

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>parameternames</artifactId>
                <version>1.3</version>
            </dependency>

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>bytecode</artifactId>
                <version>1.1</version>
            </dependency>

            <dependency>
                <groupId>com.facebook.airlift</groupId>
                <artifactId>security</artifactId>
                <version>${dep.airlift.version}</version>
            </dependency>

            <dependency>
                <groupId>com.facebook.airlift</groupId>
                <artifactId>stats</artifactId>
                <version>${dep.airlift.version}</version>
            </dependency>

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

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>units</artifactId>
                <version>1.3</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-common</artifactId>
                <version>${dep.netty.version}</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-buffer</artifactId>
                <version>${dep.netty.version}</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-handler-proxy</artifactId>
                <version>${dep.netty.version}</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-handler</artifactId>
                <version>${dep.netty.version}</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-transport</artifactId>
                <version>${dep.netty.version}</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-codec</artifactId>
                <version>${dep.netty.version}</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-transport-classes-epoll</artifactId>
                <version>${dep.netty.version}</version>
            </dependency>

            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-transport-native-epoll</artifactId>
                <version>${dep.netty.version}</version>
                <classifier>linux-x86_64</classifier>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.6</version>
            </dependency>

            <dependency>
                <groupId>org.apache.thrift</groupId>
                <artifactId>libthrift</artifactId>
                <version>0.12.0</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpcore</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.apache.httpcomponents</groupId>
                        <artifactId>httpclient</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.squareup</groupId>
                <artifactId>javapoet</artifactId>
                <version>1.9.0</version>
            </dependency>

            <dependency>
                <groupId>io.takari.maven.plugins</groupId>
                <artifactId>takari-plugin-testing</artifactId>
                <version>${dep.takari-plugin.version}</version>
            </dependency>

            <dependency>
                <groupId>io.takari.maven.plugins</groupId>
                <artifactId>takari-plugin-integration-testing</artifactId>
                <version>${dep.takari-plugin.version}</version>
                <type>pom</type>
            </dependency>

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

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

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

            <dependency>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-annotations</artifactId>
                <version>3.5</version>
            </dependency>

            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.12</version>
            </dependency>

            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.9.9</version>
            </dependency>

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

            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>4.2.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.gaul</groupId>
                    <artifactId>modernizer-maven-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.5.1</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>3.1.0</version>
                </plugin>

                <plugin>
                    <groupId>io.takari.maven.plugins</groupId>
                    <artifactId>takari-lifecycle-plugin</artifactId>
                    <version>1.13.4</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <systemPropertyVariables>
                            <io.netty.leakDetection.level>PARANOID</io.netty.leakDetection.level>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <configuration>
                        <excludeFilterFile>${air.main.basedir}/src/spotbugs/exclude.xml</excludeFilterFile>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <preparationGoals>clean verify -DskipTests</preparationGoals>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <profiles>
        <profile>
            <id>oss-release</id>
            <properties>
                <!-- tests run in the preparation step of the release -->
                <skipTests>true</skipTests>
            </properties>
            <build>
                <plugins>
                    <!-- oss requires a javadoc jar. Build one when releasing. -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <!-- Sign artifacts using gpg for oss upload -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.4</version>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>${dep.central-publishing.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>ossrh</publishingServerId>
                            <autoPublish>true</autoPublish>
                            <waitUntil>validated</waitUntil>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
