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

    <groupId>tech.picnic</groupId>
    <artifactId>oss-parent</artifactId>
    <version>0.0.2</version>
    <packaging>pom</packaging>

    <name>Picnic :: OSS Maven Parent</name>
    <description>Maven parent POM for open-source code by Picnic.</description>
    <url>https://github.com/PicnicSupermarket/oss-parent</url>
    <inceptionYear>2019</inceptionYear>
    <organization>
        <name>Picnic Technologies BV</name>
        <url>http://picnic.tech</url>
    </organization>
    <licenses>
        <license>
            <name>MIT</name>
            <url>https://opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Stephan Schroevers</name>
            <email>stephan.schroevers@teampicnic.com</email>
            <organization>Picnic Technologies BV</organization>
            <timezone>Europe/Amsterdam</timezone>
        </developer>
    </developers>

    <scm>
        <developerConnection>scm:git:git@github.com:PicnicSupermarket/oss-parent.git</developerConnection>
        <url>https://github.com/PicnicSupermarket/oss-parent</url>
        <tag>v0.0.2</tag>
    </scm>
    <issueManagement>
        <system>Github</system>
        <url>https://github.com/PicnicSupermarket/oss-parent/issues</url>
    </issueManagement>
    <ciManagement>
        <system>Travis CI</system>
        <url>https://travis-ci.org/PicnicSupermarket/oss-parent</url>
    </ciManagement>
    <distributionManagement>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <version.error-prone>2.3.3</version.error-prone>
        <version.error-prone-javac>9+181-r4173-1</version.error-prone-javac>
        <version.guava-beta-checker>1.0</version.guava-beta-checker>
        <version.jdk>1.8</version.jdk>
        <version.jooq>3.11.11</version.jooq>
        <version.maven>3.6.1</version.maven>
        <version.mockito>3.0.0</version.mockito>
        <version.postgresql>42.2.6</version.postgresql>
        <version.nullaway>0.7.5</version.nullaway>
        <version.surefire>2.22.2</version.surefire>
        <!-- Our build system (Travis CI) provides a monotonically increasing
        build number. When building locally, this number is obviously absent.
        So we provide a default value. -->
        <build.number>LOCAL</build.number>
        <!-- Arguments to the JVMs forked by Surefire. The specification of
        this 'argLine' property instead of the definition of the 'argLine'
        configuration setting allows users or plugins to specify additional
        arguments. In particular, JaCoCo relies on this for the configuration
        of its Java agent. -->
        <argLine><!--
            The test JVMs are short-running. By disabling certain expensive JIT
            optimizations we actually speed up most tests. -->
            -XX:TieredStopAtLevel=1
            <!-- We cap memory usage. This is especially relevant on Travis CI,
            but locally this should also be more than enough. -->
            -Xmx512m
            <!-- This argument cannot be set through Surefire's
            'systemPropertyVariables' configuration setting. Setting the file
            encoding is necessary because forked unit test invocations
            otherwise use the environment's file encoding. -->
            -Dfile.encoding=${project.build.sourceEncoding}
            <!-- This argument *can* be set through Surefire's
            'systemPropertyVariables' configuration setting, but by placing it
            here it automatically also applies to the Failsafe plugin. On Unix
            systems we use a lower-quality source of randomness, so as to avoid
            potential slowdown of tests relying on java.security.SecureRandom.
            Note that it is not fatal for the file to not exist, so this
            setting is Windows-compatible. The '/./' syntax is no accident; see
            https://bugs.openjdk.java.net/browse/JDK-6202721 for details. -->
            -Djava.security.egd=file:/dev/./urandom
            <!-- On Mac OS X, running in headless mode prevents the forked JVMs
            from showing up in the dock and capturing window focus. -->
            -Djava.awt.headless=true
        </argLine>
        <!-- Property using which additional Error Prone flags can be
        specified. Used by the `patch` profile to enable patching. -->
        <error-prone.args />
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>3.0.2</version>
            </dependency>
            <dependency>
                <groupId>com.google.errorprone</groupId>
                <artifactId>error_prone_annotations</artifactId>
                <version>${version.error-prone}</version>
            </dependency>
            <!-- Specified as a workaround for
            https://github.com/mojohaus/versions-maven-plugin/issues/244. -->
            <dependency>
                <groupId>com.google.errorprone</groupId>
                <artifactId>error_prone_core</artifactId>
                <version>${version.error-prone}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>28.0-jre</version>
            </dependency>
            <!-- Specified as a workaround for
            https://github.com/mojohaus/versions-maven-plugin/issues/244. -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava-beta-checker</artifactId>
                <version>${version.guava-beta-checker}</version>
            </dependency>
            <!-- Specified as a workaround for
            https://github.com/mojohaus/versions-maven-plugin/issues/244. -->
            <dependency>
                <groupId>com.uber.nullaway</groupId>
                <artifactId>nullaway</artifactId>
                <version>${version.nullaway}</version>
            </dependency>
            <dependency>
                <groupId>org.jooq</groupId>
                <artifactId>jooq</artifactId>
                <version>${version.jooq}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${version.mockito}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-inline</artifactId>
                <version>${version.mockito}</version>
            </dependency>
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>${version.postgresql}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_annotations</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.coveo</groupId>
                    <artifactId>fmt-maven-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
                <plugin>
                    <groupId>com.lewisd</groupId>
                    <artifactId>lint-maven-plugin</artifactId>
                    <version>0.0.11</version>
                    <executions>
                        <execution>
                            <id>validate-pom</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <failOnViolation>false</failOnViolation>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>de.thetaphi</groupId>
                    <artifactId>forbiddenapis</artifactId>
                    <version>2.6</version>
                    <executions>
                        <execution>
                            <id>detect-forbidden-api-usage</id>
                            <goals>
                                <goal>check</goal>
                                <goal>testCheck</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <bundledSignatures>
                            <bundledSignature>jdk-internal</bundledSignature>
                            <bundledSignature>jdk-non-portable</bundledSignature>
                            <bundledSignature>jdk-reflection</bundledSignature>
                            <bundledSignature>jdk-system-out</bundledSignature>
                            <!-- Other bundles are available but currently not
                            enabled:
                            - commons-io-unsafe-*: while we may indirectly rely
                              on Apache Commons IO, we avoid direct
                              dependencies.
                            - jdk-deprecated: we compile with `-Xlint:all`,
                              which causes the build to fail when _any_
                              deprecated method is called.
                            - jdk-unsafe: see
                              https://github.com/policeman-tools/forbidden-apis/issues/119.
                            Note that this whole plugin could be replaced with
                            an Error Prone check; that would also make it
                            possible to resolve issue #119 linked above. See
                            https://github.com/google/error-prone/issues/632. -->
                        </bundledSignatures>
                        <!-- The plugin tries to load all supertypes of any
                        class it analyzes. Some of those types may be absent
                        from the compilation classpath, because the module that
                        contains them has the `runtime` or `test` scope. When
                        this happens, we don't want to fail the build. (The
                        alternative is to declare all those dependencies
                        `provided`, but we'd rather not do that.) -->
                        <failOnMissingClasses>false</failOnMissingClasses>
                        <failOnViolation>false</failOnViolation>
                        <targetVersion>${version.jdk}</targetVersion>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>io.takari</groupId>
                    <artifactId>maven</artifactId>
                    <version>0.7.6</version>
                    <configuration>
                        <maven>${version.maven}</maven>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <id>run-checkstyle</id>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <checkstyleRules>
                            <!-- We only enable rules that are not enforced by
                            Error Prone or automatically corrected through
                            application of google-java-format. -->
                            <module name="Checker">
                                <module name="SuppressWarningsFilter" />
                                <module name="TreeWalker">
                                    <module name="AnnotationUseStyle">
                                        <!-- XXX: Right now this check doesn't
                                        completely enforce the desired style.
                                        See https://github.com/checkstyle/checkstyle/issues/4972;
                                        we're looking for the proposed `compact
                                        = ALWAYS` and `singleArrayCurlies =
                                        NEVER` style. -->
                                    </module>
                                    <module name="DeclarationOrder">
                                        <!-- We don't enforce sorting fields by
                                        their visibility modifier, for two
                                        reasons:
                                        - During (class) initialization
                                          declaration order matters. Though the
                                          plugin does not warn about fields
                                          with obvious dependencies, its
                                          dependency analysis is necessarily
                                          incomplete; NPEs may result if some
                                          of its advice is followed.
                                        - Sometimes a field is annotated
                                          `@VisibleForTesting`. It may then be
                                          preferable not to reorder. The plugin
                                          does not current respect this
                                          annotation. -->
                                        <property name="ignoreModifiers" value="true" />
                                    </module>
                                    <module name="DefaultComesLast" />
                                    <module name="DesignForExtension" />
                                    <module name="EmptyBlock" />
                                    <module name="EmptyCatchBlock" />
                                    <module name="EmptyStatement" />
                                    <module name="FinalClass" />
                                    <module name="HiddenFieldCheck">
                                        <property name="ignoreConstructorParameter" value="true" />
                                        <property name="ignoreSetter" value="true" />
                                        <property name="setterCanReturnItsClass" value="true" />
                                    </module>
                                    <module name="IllegalImport">
                                        <property name="illegalClasses" value="javax.annotation.concurrent.Immutable">
                                            <!-- Instead, please use
                                            `com.google.errorprone.annotations.Immutable`. -->
                                        </property>
                                        <property name="illegalClasses" value="javax.xml.bind.DatatypeConverter" />
                                        <property name="illegalClasses" value="org.springframework.context.annotation.ComponentScan">
                                            <!-- Instead, please explicitly
                                            `@Import` the components. -->
                                        </property>
                                        <property name="illegalPkgs" value="com.amazonaws.annotation" />
                                        <property name="illegalPkgs" value="com.beust.jcommander.internal" />
                                        <property name="illegalPkgs" value="com.google.api.client.repackaged" />
                                        <property name="illegalPkgs" value="com.newrelic.agent.deps" />
                                        <property name="illegalPkgs" value="jdk" />
                                        <property name="illegalPkgs" value="jersey.repackaged" />
                                        <property name="illegalPkgs" value="nl.jqno.equalsverifier.internal" />
                                        <property name="illegalPkgs" value="org.apache.commons.lang3">
                                            <!-- Instead, please use Guava or a
                                            custom helper method. -->
                                        </property>
                                        <property name="illegalPkgs" value="org.immutables.value.internal" />
                                        <property name="illegalPkgs" value="org.mutabilitydetector.internal" />
                                    </module>
                                    <module name="IllegalImport">
                                        <!-- XXX: This config uses
                                        regexes so as to disallow static
                                        imports. Once `illegalClasses`
                                        disallows static imports by default,
                                        this config can be merged into the one
                                        above. See
                                        https://github.com/checkstyle/checkstyle/issues/4954. -->
                                        <property name="illegalClasses" value="org\.testng\.AssertJUnit(\..*?)?" />
                                        <property name="regexp" value="true" />
                                    </module>
                                    <module name="IllegalCatch" />
                                    <module name="IllegalThrows" />
                                    <module name="InnerAssignment" />
                                    <module name="InvalidJavadocPosition" />
                                    <module name="MissingDeprecated" />
                                    <module name="MutableException" />
                                    <module name="NeedBraces" />
                                    <module name="NoClone" />
                                    <module name="NoFinalizer" />
                                    <module name="PackageDeclaration" />
                                    <module name="ParameterAssignment" />
                                    <module name="RedundantModifier" />
                                    <module name="SimplifyBooleanExpression" />
                                    <module name="SimplifyBooleanReturn" />
                                    <module name="SuppressWarningsHolder" />
                                    <module name="TrailingComment" />
                                    <module name="WriteTag">
                                        <property name="tag" value="@author" />
                                        <property name="tagFormat" value="\S" />
                                        <property name="tagSeverity" value="error" />
                                        <property name="severity" value="ignore" />
                                    </module>
                                    <module name="UnnecessaryParentheses" />
                                    <module name="UnnecessarySemicolonInEnumeration" />
                                    <module name="UnnecessarySemicolonInTryWithResources" />
                                    <module name="UnusedImports">
                                        <!-- Error-prone also detects these,
                                        but (currently) doesn't warn about
                                        JavaDoc-only imports. -->
                                    </module>
                                </module>
                                <module name="UniqueProperties" />
                            </module>
                        </checkstyleRules>
                        <excludes>**/data/**/schema/**/*</excludes>
                        <failOnViolation>false</failOnViolation>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>8.23</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <compilerArgs>
                            <arg>-Xmaxerrs</arg>
                            <arg>10000</arg>
                            <arg>-Xmaxwarns</arg>
                            <arg>10000</arg>
                        </compilerArgs>
                        <parameters>true</parameters>
                        <source>${version.jdk}</source>
                        <target>${version.jdk}</target>
                        <!-- Erroneously inverted logic... for details, see
                        https://issues.apache.org/jira/browse/MCOMPILER-209. -->
                        <useIncrementalCompilation>false</useIncrementalCompilation>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <ignoreDirect>false</ignoreDirect>
                        <ignoreNonCompile>true</ignoreNonCompile>
                    </configuration>
                    <dependencies>
                        <!-- XXX: This dependency is declared for compatibility
                        with JDK 11. See
                        https://jira.apache.org/jira/browse/MDEP-613. -->
                        <dependency>
                            <groupId>org.apache.maven.shared</groupId>
                            <artifactId>maven-dependency-analyzer</artifactId>
                            <version>1.11.1</version>
                        </dependency>
                    </dependencies>
                </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-enforcer-plugin</artifactId>
                    <version>3.0.0-M1</version>
                    <executions>
                        <execution>
                            <id>apply-enforcement-rules</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <fail>false</fail>
                        <rules>
                            <banDuplicatePomDependencyVersions />
                            <dependencyConvergence />
                            <requireJavaVersion>
                                <version>${version.jdk}</version>
                            </requireJavaVersion>
                            <requireMavenVersion>
                                <version>${version.maven}</version>
                            </requireMavenVersion>
                            <requirePluginVersions />
                            <requireSameVersionsReactor />
                            <requireUpperBoundDeps />
                        </rules>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>extra-enforcer-rules</artifactId>
                            <version>1.2</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.1.2</version>
                    <executions>
                        <execution>
                            <id>create-test-jar</id>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <skipIfEmpty>true</skipIfEmpty>
                        <archive>
                            <manifest>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-Title>${project.name}</Implementation-Title>
                                <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
                                <Implementation-Version>${project.version}.${build.number}.${build.revision}</Implementation-Version>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.1.1</version>
                    <executions>
                        <execution>
                            <id>generate-javadoc-jar</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <!-- All relevant doclint checks are performed during
                        the compilation phase; no need to recheck during
                        Javadoc generation. -->
                        <doclint>none</doclint>
                        <source>${version.jdk}</source>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <releaseProfiles>release</releaseProfiles>
                        <tagNameFormat>v@{project.version}</tagNameFormat>
                        <useReleaseProfile>false</useReleaseProfile>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                    <configuration>
                        <delimiters>
                            <delimiter>@</delimiter>
                        </delimiters>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <id>generate-source-jar</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.surefire}</version>
                    <configuration>
                        <includes>
                            <include>**/*Test.java</include>
                        </includes>
                        <!-- Timing measurements indicate that it's generally
                        not beneficial to perform method-level parallelization
                        for unit tests. -->
                        <parallel>classes</parallel>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <threadCount>2</threadCount>
                        <trimStackTrace>false</trimStackTrace>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>1.4</version>
                    <executions>
                        <execution>
                            <id>determine-build-number</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>create</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <buildNumberPropertyName>build.revision</buildNumberPropertyName>
                        <revisionOnScmFailure>UNKNOWN</revisionOnScmFailure>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>2.0.0</version>
                    <configuration>
                        <!-- Nearly no projects ship a "missing third party
                        licenses" file. Since the operation of attempting to
                        retrieve these files is very slow, we have decided to
                        disable this functionality at this time. -->
                        <useRepositoryMissingFiles>false</useRepositoryMissingFiles>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>tidy-maven-plugin</artifactId>
                    <version>1.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.7</version>
                </plugin>
                <plugin>
                    <groupId>org.eluder.coveralls</groupId>
                    <artifactId>coveralls-maven-plugin</artifactId>
                    <version>4.3.0</version>
                    <!-- XXX: This dependency declaration ensures JDK 9+
                    compatibility. Drop it once
                    https://github.com/trautonen/coveralls-maven-plugin/issues/112
                    has been resolved and released. -->
                    <dependencies>
                        <dependency>
                            <groupId>javax.xml.bind</groupId>
                            <artifactId>jaxb-api</artifactId>
                            <version>2.3.1</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.gaul</groupId>
                    <artifactId>modernizer-maven-plugin</artifactId>
                    <version>1.8.0</version>
                    <executions>
                        <execution>
                            <id>modernize</id>
                            <phase>process-test-classes</phase>
                            <goals>
                                <goal>modernizer</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <exclusionPatterns>
                            <!-- The plugin suggests replacing Guava's
                            immutable collection factory methods with
                            `java.util.{List,Map,Set}.{copyOf,of}`, but those
                            methods don't allow one to convey immutability at
                            the type system level. -->
                            <exclusionPattern>com/google/common/collect/Immutable(List|Map|Set)\.(copyOf|of):.*</exclusionPattern>
                        </exclusionPatterns>
                        <failOnViolations>false</failOnViolations>
                        <javaVersion>${version.jdk}</javaVersion>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.4</version>
                </plugin>
                <plugin>
                    <groupId>org.jooq</groupId>
                    <artifactId>jooq-codegen-maven</artifactId>
                    <version>${version.jooq}</version>
                    <configuration>
                        <generator>
                            <generate>
                                <javaTimeTypes>true</javaTimeTypes>
                            </generate>
                        </generator>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.jooq</groupId>
                            <artifactId>jooq-meta-extensions</artifactId>
                            <version>${version.jooq}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.postgresql</groupId>
                            <artifactId>postgresql</artifactId>
                            <version>${version.postgresql}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.pitest</groupId>
                    <artifactId>pitest-maven</artifactId>
                    <version>1.4.9</version>
                    <executions>
                        <execution>
                            <id>compute-mutation-coverage</id>
                            <goals>
                                <goal>mutationCoverage</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <mutators>
                            <mutator>ALL</mutator>
                        </mutators>
                        <!-- Use multple threads to speed things up. Extend
                        timeouts to prevent false positives as a result of
                        contention. -->
                        <threads>4</threads>
                        <timeoutFactor>4</timeoutFactor>
                        <timestampedReports>false</timestampedReports>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>3.6.0.1398</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <!-- When using JDK 8, Error Prone requires that the specific (JDK
            9-based) version of `javac` it integrates against is on the boot
            classpath. This custom Error Prone `javac` is resolved implicitly
            as a dependency of `error_prone_core`; as such the path configured
            below is guaranteed to exist by the time the classpath is
            consulted. -->
            <id>jdk8</id>
            <activation>
                <jdk>1.8</jdk>
                <property>
                    <name>!verification.skip</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <configuration>
                                <compilerArgs combine.children="append">
                                    <arg>-J-XX:TieredStopAtLevel=1</arg>
                                    <arg>-J-Xbootclasspath/p:${settings.localRepository}/com/google/errorprone/javac/${version.error-prone-javac}/javac-${version.error-prone-javac}.jar</arg>
                                </compilerArgs>
                                <fork>true</fork>
                                <maxmem>256m</maxmem>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <!-- If explicitly enabled using `-Pcoverage` we use PIT to
            establish coverage through mutation testing. -->
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.pitest</groupId>
                        <artifactId>pitest-maven</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- If explicitly enabled using `-Pformat` the source code is
            formatted. -->
            <id>format</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.coveo</groupId>
                        <artifactId>fmt-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- By default we verify various aspects of a module and the
            artifact(s) it produces. We define these checks in a profile so
            that they can be disabled during development. See also the
            `error-prone` profile defined below. -->
            <id>build-checks</id>
            <activation>
                <property>
                    <name>!verification.skip</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.coveo</groupId>
                        <artifactId>fmt-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>check-source-format</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.lewisd</groupId>
                        <artifactId>lint-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>de.thetaphi</groupId>
                        <artifactId>forbiddenapis</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <annotationProcessorPaths combine.children="append">
                                <path>
                                    <groupId>com.google.guava</groupId>
                                    <artifactId>guava-beta-checker</artifactId>
                                    <version>${version.guava-beta-checker}</version>
                                </path>
                                <path>
                                    <groupId>com.uber.nullaway</groupId>
                                    <artifactId>nullaway</artifactId>
                                    <version>${version.nullaway}</version>
                                </path>
                            </annotationProcessorPaths>
                            <compilerArgs combine.children="append">
                                <!-- We enable nearly all doclint checks,
                                except that we don't care about missing Javadoc. -->
                                <!-- XXX: For OSS code, consider requiring
                                Javadoc on public classes and members; in that
                                case pass `-missing/package`. -->
                                <arg>-Xdoclint:all,-missing</arg>
                                <arg>-Xlint:all</arg>
                                <!-- The annotation processors do not handle
                                all annotations present on the classpath, and
                                javac complains about this. See
                                https://bugs.openjdk.java.net/browse/JDK-6999068. -->
                                <arg>-Xlint:-processing</arg>
                            </compilerArgs>
                            <showWarnings>true</showWarnings>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>analyze-dependencies</id>
                                <phase>process-test-classes</phase>
                                <goals>
                                    <goal>analyze-dep-mgt</goal>
                                    <goal>analyze-duplicate</goal>
                                    <goal>analyze-only</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>check-third-party-licenses</id>
                                <goals>
                                    <goal>add-third-party</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.gaul</groupId>
                        <artifactId>modernizer-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- An extension of the `build-checks` profile which configures
            Error Prone. This configuration is defined in a separate profile so
            that it can be combined with the `patch` profile below, without
            introducing the overhead of other build checks. -->
            <id>error-prone</id>
            <activation>
                <property>
                    <name>!verification.skip</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <annotationProcessorPaths combine.children="append">
                                <path>
                                    <groupId>com.google.errorprone</groupId>
                                    <artifactId>error_prone_core</artifactId>
                                    <version>${version.error-prone}</version>
                                </path>
                                <!-- XXX: Enable this plugin once we depend on
                                Error Prone 2.3.4+; when using version 2.3.3
                                there's a name clash for bug checker
                                `MockitoInternalUsage`.
                                <path>
                                    <groupId>org.mockito</groupId>
                                    <artifactId>mockito-errorprone</artifactId>
                                    <version>${version.mockito}</version>
                                </path>
                                -->
                            </annotationProcessorPaths>
                            <compilerArgs combine.children="append">
                                <!-- Enable and configure Error Prone. -->
                                <!-- XXX: The awkward comment formatting used
                                here ensures that the plugin arguments are
                                separated only by spaces. Once we drop support
                                for JDK 8 we can clean this up; later versions
                                do properly handle newline separators. See
                                https://github.com/google/error-prone/pull/1115. -->
                                <arg>
                                    -Xplugin:ErrorProne <!--
                                    We use a separate Maven profile to raise
                                    all warnings as errors. This way one can
                                    optionally collect all warnings without
                                    failing the build on the first error
                                    encountered.
                                    --> -XepAllErrorsAsWarnings <!--
                                    We want to enable almost all Error
                                    Prone bug pattern checkers, so we enable
                                    all and then selectively deactivate some.
                                    --> -XepAllDisabledChecksAsWarnings <!--
                                    Some generated classes violate Error Prone
                                    bug patterns. We cannot in all cases avoid
                                    that, so we simply tell Error Prone not to
                                    warn about generated code.
                                    --> -XepDisableWarningsInGeneratedCode <!--
                                    --> -XepExcludedPaths:${project.build.directory}/.* <!--
                                    We don't target Android.
                                    --> -Xep:AndroidJdkLibsChecker:OFF <!--
                                    We don't target JDK 7.
                                    --> -Xep:Java7ApiChecker:OFF <!--
                                    See https://github.com/google/error-prone/issues/1236
                                    and https://github.com/google/error-prone/issues/1248.
                                    --> -Xep:ReturnMissingNullable:OFF <!--
                                    Deals with an Android-specific limitation
                                    not applicable to us. See also
                                    https://github.com/google/error-prone/issues/488.
                                    --> -Xep:StaticOrDefaultInterfaceMethod:OFF <!--
                                    --> -XepOpt:NullAway:AnnotatedPackages=tech.picnic <!--
                                    --> -XepOpt:NullAway:AssertsEnabled=true <!--
                                    Append additional custom arguments.
                                    --> ${error-prone.args}
                                </arg>
                                <!-- The Error Prone plugin makes certain
                                assumptions about the state of the AST at the
                                moment it is invoked. Those assumptions are met
                                when using the `simple` compile policy. This
                                flag may be dropped after resolution of
                                https://bugs.openjdk.java.net/browse/JDK-8155674. -->
                                <arg>-XDcompilePolicy=simple</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <!-- If combined with the `error-prone` profile above, this profile
            configures Error Prone to try and automatically fix (rather than
            merely flag) bug pattern violations in the source code. -->
            <id>patch</id>
            <activation>
                <property>
                    <name>errorprone.patchchecks</name>
                </property>
            </activation>
            <properties>
                <error-prone.args>-XepPatchChecks:${errorprone.patchchecks} -XepPatchLocation:IN_PLACE</error-prone.args>
            </properties>
        </profile>
        <profile>
            <!-- The `build-checks` and `error-prone` profiles enable a whole
            bunch of additional compile checks. By default those warnings break
            the build. This profile allows one to collect all build warnings
            without failing the build. -->
            <id>disallow-warnings</id>
            <activation>
                <property>
                    <name>!verification.warn</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.lewisd</groupId>
                            <artifactId>lint-maven-plugin</artifactId>
                            <configuration>
                                <failOnViolation>true</failOnViolation>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>de.thetaphi</groupId>
                            <artifactId>forbiddenapis</artifactId>
                            <configuration>
                                <failOnViolation>true</failOnViolation>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-checkstyle-plugin</artifactId>
                            <configuration>
                                <failOnViolation>true</failOnViolation>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-compiler-plugin</artifactId>
                            <configuration>
                                <compilerArgs combine.children="append">
                                    <!-- When using a JDK other than the one
                                    specified using `-source`, `javac` warns
                                    that the bootstrap classpath will not be
                                    set. We don't want to fail on that warning. -->
                                    <arg>-Xlint:-options</arg>
                                </compilerArgs>
                                <failOnWarning>true</failOnWarning>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-dependency-plugin</artifactId>
                            <configuration>
                                <failBuild>true</failBuild>
                                <failOnWarning>true</failOnWarning>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-enforcer-plugin</artifactId>
                            <configuration>
                                <fail>true</fail>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>license-maven-plugin</artifactId>
                            <configuration>
                                <failOnBlacklist>true</failOnBlacklist>
                                <failOnMissing>true</failOnMissing>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.gaul</groupId>
                            <artifactId>modernizer-maven-plugin</artifactId>
                            <configuration>
                                <failOnViolations>true</failOnViolations>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <!-- A counterpart to the `disallow-warnings` profile which
            explicitly "tones down" plugins enabled by the `build-checks`
            profile. Necessary for dealing with plugins that default to failing
            the build upon encountering a violation. -->
            <id>avoid-errors</id>
            <activation>
                <property>
                    <name>verification.warn</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>com.coveo</groupId>
                            <artifactId>fmt-maven-plugin</artifactId>
                            <configuration>
                                <skip>true</skip>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <!-- This profile is auto-activated when performing a release. -->
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <!-- Lexicographically this plugin is listed out-of-order
                    because it must be executed after the
                    `maven-javadoc-plugin`; otherwise not all artifacts will be
                    signed. -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
