<?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>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>io.airlift</groupId>
    <artifactId>airbase</artifactId>
    <packaging>pom</packaging>
    <version>7</version>
    <name>airbase</name>
    <description>airlift parent pom</description>
    <url>https://github.com/airlift/airbase/</url>

    <inceptionYear>2013</inceptionYear>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com/airlift/${project.artifactId}.git</connection>
        <developerConnection>scm:git:git@github.com:airlift/${project.artifactId}.git</developerConnection>
        <url>https://github.com/airlift/${project.artifactId}</url>
        <tag>7</tag>
    </scm>

    <developers>
    </developers>

    <properties>
        <!-- see http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.targetJdk>1.7</project.build.targetJdk>
        <project.report.outputEncoding>UTF-8</project.report.outputEncoding>
        <project.report.inputEncoding>UTF-8</project.report.inputEncoding>

        <!-- airlift build specific options are prefixed air.build. -->

        <!-- Default jvm size for compiler, tests etc. -->
        <air.build.jvmsize>1024m</air.build.jvmsize>

        <!-- whether a release:perform automatically pushes the created files and tags to -->
        <!-- the upstream repository. Default is no. -->
        <air.release.push-changes>false</air.release.push-changes>

        <!-- define the forkmode for tests. Default is 'once' -->
        <air.test.fork-mode>once</air.test.fork-mode>

        <!-- Controls all the checkers run when building the project.            -->
        <!-- Can be activated with -Dair.check.skip-all=true on the command line. -->
        <air.check.skip-all>false</air.check.skip-all>
        <!-- Controls the basic checkers run when building the project.          -->
        <air.check.skip-basic>${air.check.skip-all}</air.check.skip-basic>
        <!-- Controls the extended checkers run when building the project.       -->
        <air.check.skip-extended>${air.check.skip-all}</air.check.skip-extended>

        <!-- basic checks -->
        <air.check.skip-enforcer>${air.check.skip-basic}</air.check.skip-enforcer>
        <air.check.skip-dependency>${air.check.skip-basic}</air.check.skip-dependency>
        <air.check.skip-duplicate-finder>${air.check.skip-basic}</air.check.skip-duplicate-finder>
        <air.check.skip-dependency-version-check>${air.check.skip-basic}</air.check.skip-dependency-version-check>

        <!-- extended checks -->
        <air.check.skip-findbugs>${air.check.skip-extended}</air.check.skip-findbugs>
        <air.check.skip-pmd>${air.check.skip-extended}</air.check.skip-pmd>
        <air.check.skip-license>${air.check.skip-extended}</air.check.skip-license>
        <air.check.skip-jacoco>${air.check.skip-extended}</air.check.skip-jacoco>

        <air.check.fail-all>true</air.check.fail-all>
        <air.check.fail-basic>${air.check.fail-all}</air.check.fail-basic>
        <air.check.fail-extended>${air.check.fail-all}</air.check.fail-extended>

        <!-- basic checks -->
        <air.check.fail-enforcer>${air.check.fail-basic}</air.check.fail-enforcer>
        <air.check.fail-dependency>${air.check.fail-basic}</air.check.fail-dependency>
        <air.check.fail-duplicate-finder>${air.check.fail-basic}</air.check.fail-duplicate-finder>
        <air.check.fail-dependency-version-check>${air.check.fail-basic}</air.check.fail-dependency-version-check>

        <!-- extended checks -->
        <air.check.fail-findbugs>${air.check.fail-extended}</air.check.fail-findbugs>
        <air.check.fail-pmd>${air.check.fail-extended}</air.check.fail-pmd>
        <air.check.fail-license>${air.check.fail-extended}</air.check.fail-license>

        <!-- minimum maven version to build -->
        <air.maven.version>3.0</air.maven.version>

        <!-- In Multimodule builds, override this to point at the parent directory for e.g. the license resources. -->
        <!-- See http://stackoverflow.com/questions/1012402/maven2-property-that-indicates-the-parent-directory    -->
        <air.main.basedir>${project.basedir}</air.main.basedir>

        <!-- Plugin versions used in multiple places -->
        <dep.plugin.scm.version>1.8.1</dep.plugin.scm.version>

        <!-- Packaging for the tarball deployment -->
        <dep.packaging.version>0.71</dep.packaging.version>

        <!-- Dependency versions that should be the same everywhere. -->
        <dep.guice.version>3.0</dep.guice.version>
        <dep.guava.version>14.0.1</dep.guava.version>
        <dep.slf4j.version>1.7.2</dep.slf4j.version>
        <dep.logback.version>1.0.9</dep.logback.version>
        <dep.javax-inject.version>1</dep.javax-inject.version>
        <dep.javax-validation.version>1.0.0.GA</dep.javax-validation.version>
        <dep.javax-servlet.version>3.0.1</dep.javax-servlet.version>
        <dep.apache-bval.version>0.5</dep.apache-bval.version>
        <dep.jersey.version>1.17.1</dep.jersey.version>
        <dep.jetty.version>8.1.9.v20130131</dep.jetty.version>
        <dep.jmxutils.version>1.13</dep.jmxutils.version>
        <dep.cglib.version>2.2.2</dep.cglib.version>
        <dep.joda.version>2.1</dep.joda.version>
        <dep.findbugs-annotations.version>2.0.1</dep.findbugs-annotations.version>
        <dep.testng.version>6.8</dep.testng.version>
        <dep.hamcrest.version>1.3</dep.hamcrest.version>
        <dep.mockito.version>1.9.5</dep.mockito.version>
        <dep.objenesis.version>1.3</dep.objenesis.version>
    </properties>

    <prerequisites>
        <maven>${air.maven.version}</maven>
    </prerequisites>

    <build>
        <extensions>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-provider-gitexe</artifactId>
                <version>${dep.plugin.scm.version}</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-manager-plexus</artifactId>
                <version>${dep.plugin.scm.version}</version>
            </extension>
        </extensions>

        <pluginManagement>
            <plugins>

                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
                <!-- The plugin versions in here are pure "range", don't bother syncing them to the actual plugins. -->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-enforcer-plugin</artifactId>
                                        <versionRange>[0,)</versionRange>
                                        <goals>
                                            <goal>enforce</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>com.ning.maven.plugins</groupId>
                                        <artifactId>maven-dependency-versions-check-plugin</artifactId>
                                        <versionRange>[0,)</versionRange>
                                        <goals>
                                            <goal>check</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-scm-plugin</artifactId>
                    <version>${dep.plugin.scm.version}</version>
                    <configuration>
                        <connectionType>developerConnection</connectionType>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.7</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.5</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.4</version>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.7</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.2</version>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skip>${air.check.skip-enforcer}</skip>
                        <fail>${air.check.fail-enforcer}</fail>
                        <failFast>false</failFast>
                        <rules>
                            <!-- The following dependencies are hazardous for builds. -->
                            <bannedDependencies>
                                <excludes>
                                    <!-- clashes with commons-logging:commons-logging -->
                                    <exclude>commons-logging:commons-logging-api</exclude>
                                    <!-- clashes with cglib:cglib-nodep -->
                                    <exclude>cglib:cglib</exclude>
                                    <!-- junit repackages hamcrest into its own jar, which is a big no-no.
                                         junit-dep fixes this problem -->
                                    <exclude>junit:junit</exclude>
                                    <!-- use guava -->
                                    <exclude>com.google.collections:google-collections</exclude>
                                    <!-- but not the badly numbered ones... -->
                                    <exclude>com.google.guava:guava</exclude>
                                    <!-- Clashes with com.google.code.findbugs:annotations and having both jars -->
                                    <!-- as a dependency then clashes with the dependency checker (because it   -->
                                    <!-- is not very good at handling annotations). Use the annotations jar     -->
                                    <!-- instead which has all jsr305 annotations and the additional findbugs   -->
                                    <!-- stuff. -->
                                    <exclude>com.google.code.findbugs:jsr305</exclude>
                                    <!-- Use the official version at javax.servlet:javax.servlet-api -->
                                    <exclude>org.eclipse.jetty.orbit:javax.servlet</exclude>
                                    <!-- Renamed airlift modules -->
                                    <exclude>io.airlift:discovery-experimental</exclude>
                                    <exclude>io.airlift:event-experimental</exclude>
                                    <exclude>io.airlift:http-client-experimental</exclude>
                                    <exclude>io.airlift:jmx-http-experimental</exclude>
                                    <exclude>io.airlift:jmx-http-rpc-experimental</exclude>
                                    <exclude>io.airlift:rack-experimental</exclude>
                                    <exclude>io.airlift:rack-launcher-experimental</exclude>
                                    <exclude>io.airlift:rack-packaging-experimental</exclude>
                                    <exclude>io.airlift:rack-server-base-experimental</exclude>
                                </excludes>
                                <includes>
                                    <!-- whitelist the well numbered guava releases -->
                                    <include>com.google.guava:guava:[10.0.1,)</include>
                                </includes>
                            </bannedDependencies>
                            <requireMavenVersion>
                                <version>${air.maven.version}</version>
                            </requireMavenVersion>
                            <requireJavaVersion>
                                <version>${project.build.targetJdk}</version>
                            </requireJavaVersion>
                        </rules>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.7</version>
                    <configuration>
                        <skip>${air.check.skip-dependency}</skip>
                        <failOnWarning>${air.check.fail-dependency}</failOnWarning>
                        <ignoreNonCompile>true</ignoreNonCompile>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>analyze-only</goal>
                                <goal>analyze-duplicate</goal>
                                <goal>analyze-dep-mgt</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- Tweak the compiler to use more memory and use UTF-8 for the source code. -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.0</version>
                    <configuration>
                        <source>${project.build.targetJdk}</source>
                        <target>${project.build.targetJdk}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <maxmem>${air.build.jvmsize}</maxmem>
                        <showWarnings>true</showWarnings>
                    </configuration>
                </plugin>

                <!-- Resource plugins should always use UTF-8 -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.4</version>
                    <configuration>
                        <!-- must be true for jar-with-dependencies builds -->
                        <appendAssemblyId>true</appendAssemblyId>
                        <!-- Always use GNU tar mode. -->
                        <tarLongFileMode>gnu</tarLongFileMode>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.14</version>
                    <configuration>
                        <systemPropertyVariables>
                            <file.encoding>${project.build.sourceEncoding}</file.encoding>
                            <sun.jnu.encoding>${project.build.sourceEncoding}</sun.jnu.encoding>
                            <user.timezone>UTC</user.timezone>
                            <java.awt.headless>true</java.awt.headless>
                        </systemPropertyVariables>
                        <forkMode>${air.test.fork-mode}</forkMode>
                        <runOrder>random</runOrder>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.3.2</version>
                    <configuration>
                        <releaseProfiles>oss-release</releaseProfiles>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <pushChanges>${air.release.push-changes}</pushChanges>
                        <localCheckout>true</localCheckout>
                        <preparationGoals>clean install</preparationGoals>
                        <tagNameFormat>@{project.version}</tagNameFormat>
                        <useReleaseProfile>false</useReleaseProfile>
                        <goals>deploy</goals>
                        <arguments combine.self="override" />
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.9</version>
                    <configuration>
                        <source>${project.build.targetJdk}</source>
                        <target>${project.build.targetJdk}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <maxmemory>${air.build.jvmsize}</maxmemory>
                        <additionalparam>-quiet</additionalparam>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- Always build a jar with the test classes -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.4</version>
                    <executions>
                        <execution>
                            <id>attach-tests</id>
                            <phase>package</phase>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <!-- do not build an empty jar if the project is
                             e.g. a pom project -->
                        <skipIfEmpty>true</skipIfEmpty>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                <addClasspath>false</addClasspath>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>

                <!-- bundle up source code into jars for both the main and the test sources -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.2.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                                <goal>test-jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>com.ning.maven.plugins</groupId>
                    <artifactId>maven-duplicate-finder-plugin</artifactId>
                    <version>1.0.4</version>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skip>${air.check.skip-duplicate-finder}</skip>
                        <failBuildInCaseOfConflict>${air.check.fail-duplicate-finder}</failBuildInCaseOfConflict>
                        <exceptions>
                            <!-- Well done, Apache... -->
                            <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>
                                <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>
                            </exception>
                            <exception>
                                <conflictingDependencies>
                                    <dependency>
                                        <groupId>commons-beanutils</groupId>
                                        <artifactId>commons-beanutils</artifactId>
                                    </dependency>
                                    <dependency>
                                        <groupId>commons-beanutils</groupId>
                                        <artifactId>commons-beanutils-core</artifactId>
                                    </dependency>
                                </conflictingDependencies>
                                <packages>
                                    <package>org.apache.commons.beanutils</package>
                                </packages>
                            </exception>
                        </exceptions>
                        <!-- Ruby is hopeless -->
                        <ignoredDependencies>
                            <dependency>
                                <groupId>org.jruby</groupId>
                                <artifactId>jruby-complete</artifactId>
                            </dependency>
                        </ignoredDependencies>
                        <ignoredResources>
                            <ignoredResource>.*\.html</ignoredResource>
                            <ignoredResource>META-INF/.*</ignoredResource>
                            <ignoredResource>about_files/.*</ignoredResource>
                            <ignoredResource>plugin\.properties</ignoredResource>
                            <ignoredResource>.*\.java</ignoredResource>
                        </ignoredResources>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>com.ning.maven.plugins</groupId>
                    <artifactId>maven-dependency-versions-check-plugin</artifactId>
                    <version>2.0.2</version>
                    <configuration>
                        <skip>${air.check.skip-dependency-version-check}</skip>
                        <failBuildInCaseOfConflict>${air.check.fail-dependency-version-check}</failBuildInCaseOfConflict>
                        <failOnWarning>${air.check.fail-dependency-version-check}</failOnWarning>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>findbugs-maven-plugin</artifactId>
                    <version>2.5.2</version>
                    <configuration>
                        <skip>${air.check.skip-findbugs}</skip>
                        <jvmargs>-Xmx${air.build.jvmsize}</jvmargs>
                        <failOnError>${air.check.fail-findbugs}</failOnError>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>3.0.1</version>
                    <configuration>
                        <skip>${air.check.skip-pmd}</skip>
                        <failOnViolation>${air.check.fail-pmd}</failOnViolation>
                        <targetJdk>${project.build.targetJdk}</targetJdk>
                        <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
                        <minimumTokens>100</minimumTokens>
                        <excludes>
                            <exclude>**/*Bean.java</exclude>
                            <exclude>**/generated/*.java</exclude>
                        </excludes>
                        <excludeRoots>
                            <excludeRoot>target/generated-sources/stubs</excludeRoot>
                        </excludeRoots>
                        <rulesets>
                            <ruleset>/rulesets/java/basic.xml</ruleset>
                            <ruleset>/rulesets/java/clone.xml</ruleset>
                            <ruleset>/rulesets/java/finalizers.xml</ruleset>
                        </rulesets>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>com.mycila.maven-license-plugin</groupId>
                    <artifactId>maven-license-plugin</artifactId>
                    <version>1.10.b1</version>
                    <configuration>
                        <skip>${air.check.skip-license}</skip>
                        <skipExistingHeaders>true</skipExistingHeaders>
                        <failIfMissing>${air.check.fail-license}</failIfMissing>
                        <header>${air.main.basedir}/src/license/LICENSE-HEADER.txt</header>
                        <mapping>
                            <java>SLASHSTAR_STYLE</java>
                        </mapping>
                        <properties>
                            <inceptionYear>${project.inceptionYear}</inceptionYear>
                        </properties>
                        <headerSections>
                            <headerSection>
                                <key>COPYRIGHT_SECTION</key>
                                <defaultValue>Copyright (C) ${project.inceptionYear} Some Dude, Inc.</defaultValue>
                                <ensureMatch>Copyright \(C\) \d{4} .+</ensureMatch>
                                <multiLineMatch>false</multiLineMatch>
                            </headerSection>
                        </headerSections>
                        <strictCheck>true</strictCheck>
                        <aggregate>true</aggregate>
                        <useDefaultExcludes>true</useDefaultExcludes>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <excludes>
                            <exclude>.*/**</exclude>
                            <exclude>**/*.md</exclude>
                            <exclude>**/*.sh</exclude>
                            <exclude>**/*.txt</exclude>
                            <exclude>**/*.thrift</exclude>
                            <exclude>**/*.g</exclude>
                            <exclude>**/*.releaseBackup</exclude>
                            <exclude>**/*.st</exclude>
                            <exclude>**/*.raw</exclude>
                            <exclude>**/*.ser</exclude>
                            <exclude>**/*.html</exclude>
                            <exclude>**/config.properties</exclude>
                            <exclude>**/log.properties</exclude>
                            <exclude>**/src/license/**.txt</exclude>
                        </excludes>
                        <includes>
                            <include>src/**</include>
                            <include>**/pom.xml</include>
                        </includes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.6.2.201302030002</version>
                    <executions>
                        <execution>
                            <id>default</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skip>${air.check.skip-jacoco}</skip>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.4</version>
                    <configuration>
                        <useAgent>true</useAgent>
                    </configuration>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.2</version>
                </plugin>

            </plugins>
        </pluginManagement>

        <!-- This is the list of plugins used for the main build. -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.ning.maven.plugins</groupId>
                <artifactId>maven-dependency-versions-check-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.ning.maven.plugins</groupId>
                <artifactId>maven-duplicate-finder-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <!-- The following dependency should be the same everywhere. -->
    <dependencyManagement>
        <dependencies>
            <!-- Google Guice -->
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>${dep.guice.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.inject.extensions</groupId>
                <artifactId>guice-servlet</artifactId>
                <version>${dep.guice.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.inject.extensions</groupId>
                <artifactId>guice-assistedinject</artifactId>
                <version>${dep.guice.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.inject.extensions</groupId>
                <artifactId>guice-multibindings</artifactId>
                <version>${dep.guice.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.inject.extensions</groupId>
                <artifactId>guice-throwingproviders</artifactId>
                <version>${dep.guice.version}</version>
            </dependency>

            <!-- guava -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${dep.guava.version}</version>
            </dependency>

            <!-- Java APIs -->
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${dep.javax-inject.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>${dep.javax-servlet.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>${dep.javax-validation.version}</version>
            </dependency>

            <!-- logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-nop</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-ext</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>log4j-over-slf4j</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-jdk14</artifactId>
                <version>${dep.slf4j.version}</version>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${dep.logback.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${dep.logback.version}</version>
            </dependency>

            <!-- jersey -->
            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-core</artifactId>
                <version>${dep.jersey.version}</version>
            </dependency>

            <dependency>
                <groupId>com.sun.jersey.contribs</groupId>
                <artifactId>jersey-guice</artifactId>
                <version>${dep.jersey.version}</version>
            </dependency>

            <dependency>
                <groupId>com.sun.jersey.contribs</groupId>
                <artifactId>jersey-multipart</artifactId>
                <version>${dep.jersey.version}</version>
            </dependency>

            <dependency>
                <groupId>com.sun.jersey</groupId>
                <artifactId>jersey-server</artifactId>
                <version>${dep.jersey.version}</version>
            </dependency>

            <!-- jackson -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>2.1.4</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>2.1.4</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>2.1.4</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-guava</artifactId>
                <version>2.1.2</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-joda</artifactId>
                <version>2.1.2</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-smile</artifactId>
                <version>2.1.4</version>
            </dependency>

            <!-- jetty -->
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
                <version>${dep.jetty.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.eclipse.jetty.orbit</groupId>
                        <artifactId>javax.servlet</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlet</artifactId>
                <version>${dep.jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-util</artifactId>
                <version>${dep.jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlets</artifactId>
                <version>${dep.jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-security</artifactId>
                <version>${dep.jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-jmx</artifactId>
                <version>${dep.jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-http</artifactId>
                <version>${dep.jetty.version}</version>
            </dependency>

            <!-- misc stuff -->
            <dependency>
                <groupId>org.apache.bval</groupId>
                <artifactId>bval-jsr303</artifactId>
                <version>${dep.apache-bval.version}</version>
            </dependency>
            <dependency>
                <groupId>org.weakref</groupId>
                <artifactId>jmxutils</artifactId>
                <version>${dep.jmxutils.version}</version>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>${dep.joda.version}</version>
            </dependency>
            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib-nodep</artifactId>
                <version>${dep.cglib.version}</version>
            </dependency>

            <!-- findbugs -->
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>annotations</artifactId>
                <version>${dep.findbugs-annotations.version}</version>
            </dependency>

            <!-- Testing -->
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${dep.testng.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

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

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${dep.hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${dep.hamcrest.version}</version>
            </dependency>

            <dependency>
                <groupId>org.objenesis</groupId>
                <artifactId>objenesis</artifactId>
                <version>${dep.objenesis.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <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>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- ======================================================================== -->
        <!-- =                                                                      = -->
        <!-- = Build a tarball with launcher from a module if .build-airlift        = -->
        <!-- = is present                                                           = -->
        <!-- =                                                                      = -->
        <!-- ======================================================================== -->

        <profile>
            <id>build-airlift</id>
            <activation>
                <file>
                    <exists>.build-airlift</exists>
                </file>
            </activation>

            <dependencies>
                <dependency>
                    <groupId>io.airlift</groupId>
                    <artifactId>launcher</artifactId>
                    <version>${dep.packaging.version}</version>
                    <classifier>bin</classifier>
                    <type>tar.gz</type>
                    <scope>runtime</scope>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <configuration>
                            <rules combine.children="append">
                                <requireProperty>
                                    <property>main-class</property>
                                    <message>The main-class property must be specified when building an airlift tarball.</message>
                                    <regex>.+</regex>
                                    <regexMessage>The main-class property can not be empty.</regexMessage>
                                </requireProperty>
                            </rules>
                        </configuration>
                    </plugin>

                    <plugin>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <attach>true</attach>
                            <descriptorRefs>
                                <descriptorRef>distribution</descriptorRef>
                            </descriptorRefs>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>io.airlift</groupId>
                                <artifactId>packaging</artifactId>
                                <version>${dep.packaging.version}</version>
                            </dependency>
                        </dependencies>

                        <executions>
                            <execution>
                                <id>package</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>${main-class}</mainClass>
                                    <addClasspath>true</addClasspath>
                                    <useUniqueVersions>false</useUniqueVersions>
                                </manifest>
                            </archive>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-readme</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>attach-artifact</goal>
                                </goals>
                                <configuration>
                                    <artifacts>
                                        <artifact>
                                            <file>README.txt</file>
                                            <type>txt</type>
                                            <classifier>readme</classifier>
                                        </artifact>
                                    </artifacts>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
