<?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>

    <groupId>io.airlift</groupId>
    <artifactId>airbase</artifactId>
    <version>112</version>
    <packaging>pom</packaging>

    <name>airbase</name>
    <description>Base POM for Airlift</description>
    <url>https://github.com/airlift/airbase</url>

    <inceptionYear>2013</inceptionYear>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com/airlift/airbase.git</connection>
        <developerConnection>scm:git:git@github.com:airlift/airbase.git</developerConnection>
        <url>https://github.com/airlift/airbase</url>
        <tag>112</tag>
    </scm>

    <developers>
        <!-- see git log -->
        <developer>
            <name>Airlift</name>
        </developer>
    </developers>

    <repositories>
        <repository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>sonatype-nexus-snapshots</id>
            <name>Sonatype Nexus Snapshots</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <distributionManagement>
        <snapshotRepository>
            <id>${air.repository.snapshot.id}</id>
            <name>${air.repository.snapshot.name}</name>
            <url>${air.repository.snapshot.url}</url>
        </snapshotRepository>
        <repository>
            <id>${air.repository.release.id}</id>
            <name>${air.repository.release.name}</name>
            <url>${air.repository.release.url}</url>
        </repository>
    </distributionManagement>

    <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>8</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>
        <air.release.auto-version-submodules>true</air.release.auto-version-submodules>
        <air.release.release-profiles>oss-release</air.release.release-profiles>
        <air.release.preparation-goals>clean install</air.release.preparation-goals>
        <air.release.tag-name-format>@{project.version}</air.release.tag-name-format>


        <!-- define the thread count for parallel tests. -->
        <air.test.thread-count>1</air.test.thread-count>

        <!-- define the parallel mode for tests. Must be 'methods' for TestNG. -->
        <air.test.parallel />

        <!-- define the JVM timezone to use when running tests. Default is 'UTC. -->
        <air.test.timezone>UTC</air.test.timezone>

        <!-- define the JVM language to use when running tests. Default is 'en'. -->
        <air.test.language>en</air.test.language>

        <!-- define the JVM region to use when running tests. Default is 'US'. -->
        <air.test.region>US</air.test.region>

        <!-- define the JVM size for forked tests. Defaults to build JVM size. -->
        <air.test.jvmsize>${air.build.jvmsize}</air.test.jvmsize>

        <!-- provide additional options for test JVM -->
        <air.test.jvm.additional-arguments />

        <!-- Lint mode for Javadoc. Defaults to 'all'. -->
        <air.javadoc.lint>all</air.javadoc.lint>

        <!-- Target Java version for Modernizer -->
        <air.modernizer.java-version>${project.build.targetJdk}</air.modernizer.java-version>

        <!-- compiler warnings treated as errors -->
        <air.compiler.fail-warnings>false</air.compiler.fail-warnings>

        <!-- 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-scope>${air.check.skip-basic}</air.check.skip-dependency-scope>

        <!-- extended checks -->
        <air.check.skip-spotbugs>${air.check.skip-extended}</air.check.skip-spotbugs>
        <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.skip-modernizer>${air.check.skip-extended}</air.check.skip-modernizer>
        <air.check.skip-checkstyle>${air.check.skip-extended}</air.check.skip-checkstyle>

        <!-- all checks -->
        <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-scope>${air.check.fail-basic}</air.check.fail-dependency-scope>

        <!-- extended checks -->
        <air.check.fail-spotbugs>${air.check.fail-extended}</air.check.fail-spotbugs>
        <air.check.fail-pmd>${air.check.fail-extended}</air.check.fail-pmd>
        <air.check.fail-license>${air.check.fail-extended}</air.check.fail-license>
        <air.check.fail-modernizer>${air.check.fail-extended}</air.check.fail-modernizer>
        <air.check.fail-checkstyle>${air.check.fail-basic}</air.check.fail-checkstyle>

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

        <!-- minimum Java version to build -->
        <air.java.version>11</air.java.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>
        <dep.plugin.surefire.version>3.0.0-M5</dep.plugin.surefire.version>

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

        <!-- Dependency versions that should be the same everywhere. -->
        <dep.guice.version>5.0.1</dep.guice.version>
        <dep.guava.version>30.1.1-jre</dep.guava.version>
        <dep.slf4j.version>1.7.30</dep.slf4j.version>
        <dep.logback.version>1.2.3</dep.logback.version>
        <dep.javax-inject.version>1</dep.javax-inject.version>
        <dep.javax-validation.version>2.0.1.Final</dep.javax-validation.version>
        <dep.javax-servlet.version>4.0.1</dep.javax-servlet.version>
        <dep.bval.version>2.0.5</dep.bval.version>
        <dep.jackson.version>2.12.3</dep.jackson.version>
        <dep.jmxutils.version>1.21</dep.jmxutils.version>
        <dep.joda.version>2.10.10</dep.joda.version>
        <dep.spotbugs-annotations.version>4.2.3</dep.spotbugs-annotations.version>
        <dep.testng.version>6.10</dep.testng.version>
        <dep.assertj-core.version>3.18.1</dep.assertj-core.version>
        <dep.slice.version>0.39</dep.slice.version>
        <dep.jmh.version>1.20</dep.jmh.version>
        <dep.junit.version>5.8.0-M1</dep.junit.version>

        <!-- license headers -->
        <air.license.owner>${project.organization.name}</air.license.owner>
        <air.license.default-value>Copyright (C) ${project.inceptionYear} ${air.license.owner}</air.license.default-value>
        <air.license.ensure-match>Copyright \(C\) \d{4} .+</air.license.ensure-match>
        <air.license.header-file>license/apache-header.txt</air.license.header-file>

        <!-- Checkstyle -->
        <air.checkstyle.config-file>checkstyle/airbase-checks.xml</air.checkstyle.config-file>

        <!-- Readme for launcher -->
        <air.readme.file>README.txt</air.readme.file>
        <air.readme.type>txt</air.readme.type>

        <!-- Properties for controlling distributionManagement -->
        <air.repository.snapshot.id>ossrh</air.repository.snapshot.id>
        <air.repository.snapshot.name>Sonatype Nexus Snapshots</air.repository.snapshot.name>
        <air.repository.snapshot.url>https://oss.sonatype.org/content/repositories/snapshots</air.repository.snapshot.url>
        <air.repository.release.id>ossrh</air.repository.release.id>
        <air.repository.release.name>Sonatype Release Snapshots</air.repository.release.name>
        <air.repository.release.url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</air.repository.release.url>
    </properties>

    <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>
                <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.8.2</version>
                </plugin>

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

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</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>3.0.0-M3</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>extra-enforcer-rules</artifactId>
                            <version>1.3</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>validate</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>
                                    <!-- old versions of junit repackage hamcrest -->
                                    <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>
                                    <!-- the non-empty verison overlaps with classes in guava -->
                                    <exclude>com.google.guava:listenablefuture</exclude>
                                    <!-- Contains FindBugs annotations, JSR-305 and JCIP annotations -->
                                    <exclude>com.google.code.findbugs:annotations</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>
                                    <!-- newer versions of junit do not repackage hamcrest -->
                                    <include>junit:junit:[4.11,)</include>
                                </includes>
                            </bannedDependencies>
                            <banDuplicatePomDependencyVersions />
                            <requireUpperBoundDeps />
                            <requireMavenVersion>
                                <version>${air.maven.version}</version>
                            </requireMavenVersion>
                            <requireJavaVersion>
                                <version>${air.java.version}</version>
                            </requireJavaVersion>
                            <enforceBytecodeVersion>
                                <maxJdkVersion>${project.build.targetJdk}</maxJdkVersion>
                                <ignoredScopes>test</ignoredScopes>
                                <excludes>
                                    <exclude>org.eclipse.jetty:jetty-alpn-java-client</exclude>
                                    <exclude>org.eclipse.jetty:jetty-alpn-java-server</exclude>
                                </excludes>
                            </enforceBytecodeVersion>
                        </rules>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.2</version>
                    <dependencies>
                        <!-- TODO: remove when plugin is updated -->
                        <dependency>
                            <groupId>org.ow2.asm</groupId>
                            <artifactId>asm</artifactId>
                            <version>9.1</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.shared</groupId>
                            <artifactId>maven-dependency-analyzer</artifactId>
                            <version>1.11.3</version>
                            <exclusions>
                                <exclusion>
                                    <artifactId>maven-project</artifactId>
                                    <groupId>org.apache.maven</groupId>
                                </exclusion>
                            </exclusions>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <skip>${air.check.skip-dependency}</skip>
                        <failOnWarning>${air.check.fail-dependency}</failOnWarning>
                        <ignoreNonCompile>true</ignoreNonCompile>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>process-test-classes</phase>
                            <goals>
                                <goal>analyze-only</goal>
                                <goal>analyze-duplicate</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.8.1</version>
                    <configuration>
                        <source>${project.build.targetJdk}</source>
                        <release>${project.build.targetJdk}</release>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <maxmem>${air.build.jvmsize}</maxmem>
                        <failOnWarning>${air.compiler.fail-warnings}</failOnWarning>
                        <showWarnings>true</showWarnings>
                        <fork>true</fork>
                        <parameters>true</parameters>
                    </configuration>
                </plugin>

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

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

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${dep.plugin.surefire.version}</version>
                    <configuration>
                        <systemPropertyVariables>
                            <sun.jnu.encoding>${project.build.sourceEncoding}</sun.jnu.encoding>
                            <user.timezone>${air.test.timezone}</user.timezone>
                            <user.language>${air.test.language}</user.language>
                            <user.region>${air.test.region}</user.region>
                            <java.awt.headless>true</java.awt.headless>
                            <java.util.logging.SimpleFormatter.format>%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tS.%1$tL%1$tz %4$s %5$s%6$s%n</java.util.logging.SimpleFormatter.format>
                        </systemPropertyVariables>
                        <trimStackTrace>false</trimStackTrace>
                        <runOrder>random</runOrder>
                        <failIfNoTests>true</failIfNoTests>
                        <parallel>${air.test.parallel}</parallel>
                        <threadCount>${air.test.thread-count}</threadCount>
                        <!-- ${argLine} is for Jacoco: https://www.eclemma.org/jacoco/trunk/doc/prepare-agent-mojo.html -->
                        <argLine>
                            ${argLine}
                            -Dfile.encoding=${project.build.sourceEncoding}
                            -Xmx${air.test.jvmsize}
                            -Xms${air.test.jvmsize}
                            -XX:+ExitOnOutOfMemoryError
                            -XX:+HeapDumpOnOutOfMemoryError
                            -XX:-OmitStackTraceInFastThrow
                            ${air.test.jvm.additional-arguments}
                        </argLine>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.junit.jupiter</groupId>
                            <artifactId>junit-jupiter-engine</artifactId>
                            <version>${dep.junit.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.surefire</groupId>
                            <artifactId>surefire-junit-platform</artifactId>
                            <version>${dep.plugin.surefire.version}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.surefire</groupId>
                            <artifactId>surefire-testng</artifactId>
                            <version>${dep.plugin.surefire.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5</version>
                    <configuration>
                        <releaseProfiles>${air.release.release-profiles}</releaseProfiles>
                        <autoVersionSubmodules>${air.release.auto-version-submodules}</autoVersionSubmodules>
                        <mavenExecutorId>forked-path</mavenExecutorId>
                        <pushChanges>${air.release.push-changes}</pushChanges>
                        <localCheckout>true</localCheckout>
                        <preparationGoals>${air.release.preparation-goals}</preparationGoals>
                        <tagNameFormat>${air.release.tag-name-format}</tagNameFormat>
                        <useReleaseProfile>false</useReleaseProfile>
                        <goals>deploy</goals>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.2.0</version>
                    <configuration>
                        <quiet>true</quiet>
                        <source>${project.build.targetJdk}</source>
                        <encoding>${project.build.sourceEncoding}</encoding>
                        <maxmemory>${air.build.jvmsize}</maxmemory>
                        <doclint>${air.javadoc.lint}</doclint>
                    </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>3.2.0</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>
                            <manifestEntries>
                                <!-- This is actually the time when the build was done -->
                                <Build-Time>${git.build.time}</Build-Time>
                                <Git-Commit-Id>${git.commit.id}</Git-Commit-Id>
                                <Implementation-Version>${git.commit.id.describe}</Implementation-Version>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>4.0.3</version>
                    <configuration>
                        <!-- Include only properties used above to speed up build (https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/462) -->
                        <includeOnlyProperties>
                            <includeOnlyProperty>\Qgit.build.time</includeOnlyProperty>
                            <includeOnlyProperty>\Qgit.commit.id</includeOnlyProperty>
                            <includeOnlyProperty>\Qgit.commit.id.describe</includeOnlyProperty>
                        </includeOnlyProperties>
                        <dateFormat>yyyy-MM-dd'T'HH:mm:ssZZ</dateFormat>
                        <gitDescribe>
                            <tags>true</tags>
                        </gitDescribe>
                    </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>3.2.0</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>org.basepom.maven</groupId>
                    <artifactId>duplicate-finder-maven-plugin</artifactId>
                    <version>1.5.0</version>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>process-test-classes</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skip>${air.check.skip-duplicate-finder}</skip>
                        <failBuildInCaseOfConflict>${air.check.fail-duplicate-finder}</failBuildInCaseOfConflict>
                        <exceptions>
                            <exception>
                                <conflictingDependencies>
                                    <dependency>
                                        <groupId>io.airlift</groupId>
                                        <artifactId>http-server</artifactId>
                                    </dependency>
                                    <dependency>
                                        <groupId>io.airlift</groupId>
                                        <artifactId>http-client</artifactId>
                                    </dependency>
                                </conflictingDependencies>
                                <resources>
                                    <resource>jetty-logging.properties</resource>
                                </resources>
                            </exception>
                            <!-- 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>
                        <ignoredResourcePatterns>
                            <ignoredResourcePattern>.*\.html</ignoredResourcePattern>
                            <ignoredResourcePattern>META-INF/.*</ignoredResourcePattern>
                            <ignoredResourcePattern>about_files/.*</ignoredResourcePattern>
                            <ignoredResourcePattern>plugin\.properties</ignoredResourcePattern>
                            <ignoredResourcePattern>.*\.java</ignoredResourcePattern>
                            <ignoredResourcePattern>THIRD-PARTY</ignoredResourcePattern>
                        </ignoredResourcePatterns>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>com.hubspot.maven.plugins</groupId>
                    <artifactId>dependency-scope-maven-plugin</artifactId>
                    <version>0.10</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <skip>${air.check.skip-dependency-scope}</skip>
                                <fail>${air.check.fail-dependency-scope}</fail>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>4.2.3</version>
                    <configuration>
                        <skip>${air.check.skip-spotbugs}</skip>
                        <jvmArgs>-Xmx${air.build.jvmsize}</jvmArgs>
                        <failOnError>${air.check.fail-spotbugs}</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.12.0</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</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>3.0</version>
                    <dependencies>
                        <!-- This version must match the Airbase version. It will be updated by -->
                        <!-- the Maven Release plugin. The "project.version" property cannot be -->
                        <!-- used here as it will resolve to the version of the child project.  -->
                        <dependency>
                            <groupId>io.airlift</groupId>
                            <artifactId>airbase-policy</artifactId>
                            <version>112</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <skip>${air.check.skip-license}</skip>
                        <skipExistingHeaders>true</skipExistingHeaders>
                        <failIfMissing>${air.check.fail-license}</failIfMissing>
                        <header>${air.license.header-file}</header>
                        <mapping>
                            <java>SLASHSTAR_STYLE</java>
                            <g>SLASHSTAR_STYLE</g>
                            <g4>SLASHSTAR_STYLE</g4>
                        </mapping>
                        <properties>
                            <inceptionYear>${project.inceptionYear}</inceptionYear>
                        </properties>
                        <headerSections>
                            <headerSection>
                                <key>COPYRIGHT_SECTION</key>
                                <defaultValue>${air.license.default-value}</defaultValue>
                                <ensureMatch>${air.license.ensure-match}</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>**/*.sql</exclude>
                            <exclude>**/*.releaseBackup</exclude>
                            <exclude>**/*.st</exclude>
                            <exclude>**/*.raw</exclude>
                            <exclude>**/*.ser</exclude>
                            <exclude>**/*.html</exclude>
                            <exclude>**/*.rst</exclude>
                            <exclude>**/*.xml</exclude>
                            <exclude>**/*.csv</exclude>
                            <exclude>**/*.tsv</exclude>
                            <exclude>**/*.properties</exclude>
                            <exclude>**/src/license/**</exclude>
                            <exclude>**/src/*/resources/**</exclude>
                        </excludes>
                        <includes>
                            <include>src/**</include>
                        </includes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.6</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.gaul</groupId>
                    <artifactId>modernizer-maven-plugin</artifactId>
                    <version>2.2.0</version>
                    <configuration>
                        <skip>${air.check.skip-modernizer}</skip>
                        <failOnViolations>${air.check.fail-modernizer}</failOnViolations>
                        <javaVersion>${air.modernizer.java-version}</javaVersion>
                    </configuration>
                    <executions>
                        <execution>
                            <id>modernizer</id>
                            <goals>
                                <goal>modernizer</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.1.2</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>8.41.1</version>
                        </dependency>
                        <!-- This version must match the Airbase version. It will be updated by -->
                        <!-- the Maven Release plugin. The "project.version" property cannot be -->
                        <!-- used here as it will resolve to the version of the child project.  -->
                        <dependency>
                            <groupId>io.airlift</groupId>
                            <artifactId>airbase-policy</artifactId>
                            <version>112</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>checkstyle</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <configuration>
                                <skip>${air.check.skip-checkstyle}</skip>
                                <failOnViolation>${air.check.fail-checkstyle}</failOnViolation>
                                <includeTestSourceDirectory>true</includeTestSourceDirectory>
                                <configLocation>${air.checkstyle.config-file}</configLocation>
                            </configuration>
                        </execution>
                    </executions>
                </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>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.2.1</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>org.basepom.maven</groupId>
                <artifactId>duplicate-finder-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>com.hubspot.maven.plugins</groupId>
                <artifactId>dependency-scope-maven-plugin</artifactId>
            </plugin>

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

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

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

            <plugin>
                <groupId>org.gaul</groupId>
                <artifactId>modernizer-maven-plugin</artifactId>
            </plugin>

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

            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                    </execution>
                </executions>
            </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-throwingproviders</artifactId>
                <version>${dep.guice.version}</version>
            </dependency>

            <!-- guava -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${dep.guava.version}</version>
                <exclusions>
                    <!-- this empty dependency is a hack and not needed -->
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>listenablefuture</artifactId>
                    </exclusion>
                </exclusions>
            </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>

            <!-- jaxrs -->
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>javax.ws.rs-api</artifactId>
                <version>2.1</version>
            </dependency>

            <!-- jsr 250 -->
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>1.3.2</version>
            </dependency>

            <!-- jackson -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-parameter-names</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jdk8</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jsr310</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-guava</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-joda</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-yaml</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-smile</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-cbor</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-ion</artifactId>
                <version>${dep.jackson.version}</version>
            </dependency>

            <!-- misc stuff -->
            <dependency>
                <groupId>org.apache.bval</groupId>
                <artifactId>bval-jsr</artifactId>
                <version>${dep.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>

            <!-- FindBugs / SpotBugs -->
            <dependency>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-annotations</artifactId>
                <version>${dep.spotbugs-annotations.version}</version>
            </dependency>

            <!-- JSR-305 -->
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.2</version>
            </dependency>

            <!-- jmh -->
            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-core</artifactId>
                <version>${dep.jmh.version}</version>
            </dependency>

            <dependency>
                <groupId>org.openjdk.jmh</groupId>
                <artifactId>jmh-generator-annprocess</artifactId>
                <version>${dep.jmh.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>
                    <exclusion>
                        <groupId>com.google.inject</groupId>
                        <artifactId>guice</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <type>pom</type>
                <version>${dep.junit.version}</version>
                <scope>import</scope>
            </dependency>
            
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${dep.assertj-core.version}</version>
            </dependency>

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>slice</artifactId>
                <version>${dep.slice.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>

        <profile>
            <id>ci</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>eclipse-compiler</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <compilerId>eclipse</compilerId>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>org.codehaus.plexus</groupId>
                                <artifactId>plexus-compiler-eclipse</artifactId>
                                <version>2.8.3</version>
                            </dependency>
                        </dependencies>
                    </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>

            <properties>
                <process-name>${project.artifactId}</process-name>
            </properties>

            <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>

                <dependency>
                    <groupId>io.airlift</groupId>
                    <artifactId>launcher</artifactId>
                    <version>${dep.packaging.version}</version>
                    <classifier>properties</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.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>${air.readme.file}</file>
                                            <type>${air.readme.type}</type>
                                            <classifier>readme</classifier>
                                        </artifact>
                                    </artifacts>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
