<?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>com.yahoo.bard</groupId>
    <artifactId>fili-parent-pom</artifactId>
    <version>1.0.21</version>
    <packaging>pom</packaging>

    <name>Fili: parent pom</name>
    <description>Shared dependencies for the Fili libraries</description>
    <url>http://fili.io/</url>

    <modules>
        <module>fili-system-config</module>
        <module>fili-core</module>
        <module>fili-navi</module>
        <module>fili-security</module>
        <module>fili</module>
        <module>fili-sql</module>
        <module>luthier</module>
        <module>sample-applications</module>
    </modules>

    <organization>
        <name>Yahoo! Inc.</name>
        <url>http://www.yahoo.com/</url>
    </organization>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/yahoo/fili/issues</url>
    </issueManagement>
    <ciManagement>
        <system>travis</system>
        <url>https://travis-ci.org/yahoo/fili</url>
    </ciManagement>

    <inceptionYear>2016</inceptionYear>

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

    <developers>
        <developer>
            <name>Fili Maintainers</name>
            <organization>Yahoo! Inc.</organization>
            <organizationUrl>http://www.yahoo.com/</organizationUrl>
        </developer>
    </developers>

    <mailingLists>
        <mailingList>
            <name>fili-users</name>
            <subscribe>https://groups.google.com/forum/#!forum/fili-users</subscribe>
            <unsubscribe>https://groups.google.com/forum/#!forum/fili-users</unsubscribe>
            <archive>https://groups.google.com/forum/#!forum/fili-users</archive>
            <post>mailto:fili-users@googlegroups.com</post>
        </mailingList>
        <mailingList>
            <name>fili-users</name>
            <subscribe>https://groups.google.com/forum/#!forum/fili-developers</subscribe>
            <unsubscribe>https://groups.google.com/forum/#!forum/fili-developers</unsubscribe>
            <archive>https://groups.google.com/forum/#!forum/fili-developers</archive>
            <post>mailto:fili-developers@googlegroups.com</post>
        </mailingList>
    </mailingLists>

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

    <scm>
        <developerConnection>scm:git:ssh://git@github.com/yahoo/fili.git</developerConnection>
        <connection>scm:git:ssh://git@github.com/yahoo/fili.git</connection>
        <url>https://github.com/yahoo/fili</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <releaseRepoUrl>https://oss.sonatype.org/service/local/staging/deploy/maven2/</releaseRepoUrl>
        <snapshotRepoUrl>https://oss.sonatype.org/content/repositories/snapshots/</snapshotRepoUrl>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>

        <version.fili>1.0.21</version.fili>

        <version.slf4j>1.7.25</version.slf4j>
        <version.servlet>3.1.0</version.servlet>
        <version.asynchttp>2.12.3</version.asynchttp>
        <version.jersey>2.24</version.jersey>
        <version.hk2>2.5.0-b36</version.hk2>
        <version.metrics>3.2.2</version.metrics>
        <version.logback>1.2.3</version.logback>
        <version.lucene>7.5.0</version.lucene>
        <version.jetty>9.4.40.v20210413</version.jetty>
        <version.hibernate>5.4.3.Final</version.hibernate>

        <version.spring>5.1.18.RELEASE</version.spring>
        <version.groovy>2.4.15</version.groovy>
        <version.jackson>2.10.5</version.jackson>
        <version.jackson-databind>2.10.5.1</version.jackson-databind>

        <version.gmavenplus.plugin>1.6.3</version.gmavenplus.plugin>
        <version.guava>30.0-jre</version.guava>
        <version.druid.api>0.20.2</version.druid.api>

        <profiles.active>test</profiles.active>

        <disableDocLint>-Xdoclint:none</disableDocLint>

        <javadoc_options>${disableDocLint}</javadoc_options>

        <min_maven_version>3.5</min_maven_version>

        <!-- TODO: Review these -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
        <maven.deploy.skip>${env.DO_NOT_PUBLISH}</maven.deploy.skip>
        <enforcer.skip>false</enforcer.skip>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <checkstyle.skip>false</checkstyle.skip>
        <checkstyle.config.location>checkstyle-style.xml</checkstyle.config.location>
        <checkstyle.suppressions.location>checkstyle-suppressions.xml</checkstyle.suppressions.location>
        <checkstyle.version>8.29</checkstyle.version>
        <checkstyle.resourceIncludes>**/*.properties*</checkstyle.resourceIncludes>

        <dependency.locations.enabled>false</dependency.locations.enabled>
        <maven-javadoc-plugin-version>3.1.0</maven-javadoc-plugin-version>
        <maven-jar-plugin-version>3.1.1</maven-jar-plugin-version>
        <maven-war-plugin-version>3.2.2</maven-war-plugin-version>
        <maven-compiler-plugin-version>3.8.0</maven-compiler-plugin-version>
        <maven-pmd-plugin-version>3.11.0</maven-pmd-plugin-version>
        <maven-source-plugin-version>3.0.1</maven-source-plugin-version>
        <maven-surefire-plugin-version>3.0.0-M3</maven-surefire-plugin-version>
        <maven-site-plugin-version>3.7.1</maven-site-plugin-version>
        <maven-checkstyle-plugin-version>3.1.0</maven-checkstyle-plugin-version>
        <maven-project-info-reports-plugin-version>3.0.0</maven-project-info-reports-plugin-version>
        <maven-surefire-report-plugin-version>${maven-surefire-plugin-version}</maven-surefire-report-plugin-version>

        <!-- empty property used as placeholder for args injected by jacoco coverage plugin -->
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Local module dependencies -->
            <dependency>
                <groupId>com.yahoo.bard</groupId>
                <artifactId>fili-system-config</artifactId>
                <version>${version.fili}</version>
            </dependency>
            <dependency>
                <groupId>com.yahoo.bard</groupId>
                <artifactId>fili-core</artifactId>
                <version>${version.fili}</version>
            </dependency>
            <dependency>
                <groupId>com.yahoo.bard</groupId>
                <artifactId>fili</artifactId>
                <version>${version.fili}</version>
            </dependency>
            <dependency>
                <groupId>com.yahoo.bard</groupId>
                <artifactId>luthier</artifactId>
                <version>${version.fili}</version>
            </dependency>
            <dependency>
                <groupId>com.yahoo.bard</groupId>
                <artifactId>fili-core</artifactId>
                <version>${version.fili}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>

            <!-- Logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${version.slf4j}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${version.logback}</version>
            </dependency>

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

            <!-- Apache Commons Libraries -->
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>3.5</version>
            </dependency>
            <dependency>
                <groupId>commons-configuration</groupId>
                <artifactId>commons-configuration</artifactId>
                <version>1.10</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>4.1</version>
            </dependency>

            <!-- Apache Avro Libraries -->
            <dependency>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro</artifactId>
                <version>1.9.1</version>
            </dependency>

            <!-- All things Spring -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-core</artifactId>
                <version>${version.spring}</version>
            </dependency>

            <!-- Test -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.1</version>
                <scope>test</scope>
            </dependency>

            <dependency><!-- Mandatory dependency for using Spock -->
                <groupId>org.spockframework</groupId>
                <artifactId>spock-core</artifactId>
                <version>1.2-groovy-2.4</version>
                <scope>test</scope>
            </dependency>

            <!-- Optional dependencies for using Spock -->
            <dependency> <!-- enables mocking of classes (in addition to interfaces) -->
                <groupId>cglib</groupId>
                <artifactId>cglib-nodep</artifactId>
                <version>3.2.4</version>
                <scope>test</scope>
            </dependency>
            <dependency> <!-- enables mocking of classes without default constructor (together with CGLIB) -->
                <groupId>org.objenesis</groupId>
                <artifactId>objenesis</artifactId>
                <version>2.4</version>
                <scope>test</scope>
            </dependency>
            <dependency> <!-- only necessary if Hamcrest matchers are used -->
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>1.3</version>
                <scope>test</scope>
            </dependency>

            <!-- Metrics -->
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-core</artifactId>
                <version>${version.metrics}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-annotation</artifactId>
                <version>${version.metrics}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-healthchecks</artifactId>
                <version>${version.metrics}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-servlets</artifactId>
                <version>${version.metrics}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-servlet</artifactId>
                <version>${version.metrics}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-jersey2</artifactId>
                <version>${version.metrics}</version>
            </dependency>
            <dependency>
                <groupId>io.dropwizard.metrics</groupId>
                <artifactId>metrics-logback</artifactId>
                <version>${version.metrics}</version>
                <exclusions>
                    <exclusion>
                        <groupId>ch.qos.logback</groupId>
                        <artifactId>logback-classic</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- Servlet API -->
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>${version.servlet}</version>
            </dependency>

            <!-- Jersey -->
            <dependency>
                <groupId>org.glassfish.jersey.core</groupId>
                <artifactId>jersey-common</artifactId>
                <version>${version.jersey}</version>
            </dependency>
            <dependency> <!-- metrics tries to load jersey-server 2.11 -->
                <groupId>org.glassfish.jersey.core</groupId>
                <artifactId>jersey-server</artifactId>
                <version>${version.jersey}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey.containers</groupId>
                <artifactId>jersey-container-servlet</artifactId>
                <version>${version.jersey}</version>
            </dependency>
            <dependency><!-- Client for running local "integration-style" tests -->
                <groupId>org.glassfish.jersey.test-framework</groupId>
                <artifactId>jersey-test-framework-core</artifactId>
                <version>${version.jersey}</version>
                <scope>test</scope>
            </dependency>
            <dependency><!-- Container for running local "integration-style" tests -->
                <groupId>org.glassfish.jersey.test-framework.providers</groupId>
                <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
                <version>${version.jersey}</version>
                <scope>test</scope>
            </dependency>

            <!-- Injection -->
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>1.3</version>
            </dependency>
            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>1</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.hk2</groupId>
                <artifactId>hk2-api</artifactId>
                <version>${version.hk2}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.hk2.external</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${version.hk2}</version>
            </dependency>

            <!-- Druid -->
            <dependency>
                <groupId>org.apache.druid</groupId>
                <artifactId>druid-core</artifactId>
                <version>${version.druid.api}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.logging.log4j</groupId>
                        <artifactId>log4j-slf4j-impl</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>io.netty</groupId>
                        <artifactId>netty</artifactId>
                    </exclusion>
                    <exclusion>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>io.netty</groupId>
                        <artifactId>netty</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.dataformat</groupId>
                        <artifactId>jackson-dataformat-smile</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-databind</artifactId>
                    </exclusion>

                    <exclusion>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-validator</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- Json Parsing -->
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-core</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${version.jackson-databind}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.module</groupId>
                <artifactId>jackson-module-afterburner</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-annotations</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-jdk8</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.datatype</groupId>
                <artifactId>jackson-datatype-joda</artifactId>
                <version>${version.jackson}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-csv</artifactId>
                <version>${version.jackson}</version>
            </dependency>

            <!-- JodaTime -->
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>2.9.6</version>
            </dependency>

            <!-- HTTP Client -->
            <dependency>
                <groupId>org.asynchttpclient</groupId>
                <artifactId>async-http-client</artifactId>
                <version>${version.asynchttp}</version>
            </dependency>
            <dependency>
                <groupId>org.asynchttpclient</groupId>
                <artifactId>async-http-client-netty-utils</artifactId>
                <version>${version.asynchttp}</version>
            </dependency>

            <!-- ReactiveX -->
            <dependency>
                <groupId>io.reactivex</groupId>
                <artifactId>rxjava</artifactId>
                <version>1.2.4</version>
            </dependency>

            <!-- Memcached -->
            <dependency>
                <!-- TODO: Move to async memcached client -->
                <groupId>net.spy</groupId>
                <artifactId>spymemcached</artifactId>
                <version>2.12.1</version>
            </dependency>

            <!-- Lucene -->
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-core</artifactId>
                <version>${version.lucene}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-analyzers-common</artifactId>
                <version>${version.lucene}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-queries</artifactId>
                <version>${version.lucene}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.lucene</groupId>
                <artifactId>lucene-backward-codecs</artifactId>
                <version>${version.lucene}</version>
            </dependency>

            <!-- Guava -->
            <!-- Currently what we mainly use is the RangeSet containers -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${version.guava}</version>
            </dependency>

            <!-- Jetty Servlet Support -->
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlet</artifactId>
                <version>${version.jetty}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- Common things that all modules need -->
    <dependencies>
        <!-- Mandatory dependencies for using Spock -->
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
        </dependency>

        <!-- Optional dependencies for using Spock -->
        <dependency> <!-- enables mocking of classes (in addition to interfaces) -->
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
        </dependency>
        <dependency> <!-- enables mocking of classes without default constructor (together with CGLIB) -->
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
        </dependency>
        <dependency> <!-- only necessary if Hamcrest matchers are used -->
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
        </dependency>

        <!-- Validation -->
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>

        <!-- Groovy -->
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>${version.groovy}</version>
            <scope>test</scope>
        </dependency>

        <!-- Lucene -->
        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-queryparser</artifactId>
            <version>${version.lucene}</version>
        </dependency>
    </dependencies>

    <build>
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh-external</artifactId>
                <version>1.0-beta-6</version>
            </extension>
        </extensions>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${maven-source-plugin-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${maven-checkstyle-plugin-version}</version>
                    <dependencies>
                        <!-- override default checkstyle version -->
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${checkstyle.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <suppressionsLocation>${checkstyle.suppressions.location}</suppressionsLocation>
                        <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
                        <configLocation>${checkstyle.config.location}</configLocation>
                        <includes>**\/*.java,**\/*.groovy</includes>
                        <resourceIncludes>**/*.properties,**/*.sample</resourceIncludes>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <consoleOutput>true</consoleOutput>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${maven-war-plugin-version}</version>
                    <configuration>
                        <failOnMissingWebXml>false</failOnMissingWebXml>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-site-plugin</artifactId>
                    <groupId>org.apache.maven.plugins</groupId>
                    <version>${maven-site-plugin-version}</version>
                    <configuration>
                        <skipDeploy>true</skipDeploy>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>1.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven-javadoc-plugin-version}</version>
                    <configuration>
                        <quiet>true</quiet>
                        <excludePackageNames>${javadocs.package.exclude}</excludePackageNames>
                        <detectLinks>false</detectLinks>
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <additionalJOptions>H
                            <additionalJOption>-XDiag</additionalJOption>
                            <additionalJOption>-J-XX:-UseG1GC</additionalJOption>
                            <additionalJOption>-J-Xms20m</additionalJOption>
                            <additionalJOption>-J-XX:-UseLargePages</additionalJOption>
                            <additionalJOption>${javadoc_options}</additionalJOption>
                        </additionalJOptions>
                        <!-- lint breaks JDK8 builds, disable -->
                        <additionalparam>${disableDocLint}</additionalparam>
                    </configuration>
                </plugin>

                <!-- Mandatory plugins for using Spock -->
                <plugin>
                    <groupId>org.codehaus.gmavenplus</groupId>
                    <artifactId>gmavenplus-plugin</artifactId>
                    <version>${version.gmavenplus.plugin}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>addSources</goal>
                                <goal>addTestSources</goal>
                                <goal>compile</goal>
                                <goal>compileTests</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven-surefire-plugin-version}</version>
                    <configuration>
                        <forkCount>1</forkCount>
                        <reuseForks>true</reuseForks>
                        <argLine>${jacoco.args} -Xmx3G</argLine>
                        <redirectTestOutputToFile>true</redirectTestOutputToFile>
                        <includes>
                            <include>%regex[.*Spec.*]</include>
                            <include>**/*Test.java</include>
                        </includes>
                        <trimStackTrace>false</trimStackTrace>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin-version}</version>
                    <configuration>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                        <optimize>true</optimize>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>1.8</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0-M2</version>
                    <configuration>
                        <rules>
                            <requireJavaVersion>
                                <version>[1.8,1.9]</version>
                            </requireJavaVersion>
                            <requireMavenVersion>
                                <version>[${min_maven_version},)</version>
                            </requireMavenVersion>
                        </rules>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                    <configuration>
                        <goals>install</goals>
                        <useReleaseProfile>false</useReleaseProfile>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>codenarc-maven-plugin</artifactId>
                    <version>0.22-1</version>
                    <configuration>
                        <groovyVersion>${version.groovy}</groovyVersion>
                        <maxPriority1Violations>0</maxPriority1Violations>
                        <maxPriority2Violations>0</maxPriority2Violations>
                        <maxPriority3Violations>0</maxPriority3Violations>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-report-plugin</artifactId>
                    <version>${maven-surefire-report-plugin-version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-pmd-plugin</artifactId>
                    <version>${maven-pmd-plugin-version}</version>
                    <configuration>
                        <targetJdk>${maven.compiler.target}</targetJdk>
                        <sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>${maven-project-info-reports-plugin-version}</version>
                    <configuration>
                        <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>3.1.11</version>
                    <configuration>
                        <threshold>Normal</threshold>
                        <effort>Max</effort>
                        <xmlOutput>true</xmlOutput>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.3</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.owasp</groupId>
                <artifactId>dependency-check-maven</artifactId>
                <version>6.1.5</version>
                <configuration>
                    <!-- Temporarily disengaging autoupdate because of broken CVE parsing -->
                    <skip>true</skip>
                    <failBuildOnCVSS>8</failBuildOnCVSS>
                    <assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
                    <suppressionFile>owasp-suppressions.xml</suppressionFile>
                    <skipRuntimeScope>true</skipRuntimeScope>
                    <skipDependencyManagement>false</skipDependencyManagement>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Mandatory plugins for using Spock -->
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <executions>
                    <execution>
                        <id>add-groovy-sources</id>
                        <!--
                        <goals>
                            <goal>addSources</goal>
                            <goal>addTestSources</goal>
                        </goals>
                        -->
                    </execution>
                    <execution>
                        <id>compile-groovy</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile-groovy</id>
                        <!--
                        <goals>
                            <goal>compileTests</goal>
                        </goals>
                        -->
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>checkstyle</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-site-descriptor</id>
                        <inherited>false</inherited>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <id>aggregate-tests</id>
                        <inherited>false</inherited>
                        <configuration>
                            <aggregate>true</aggregate>
                            <alwaysGenerateSurefireReport>true</alwaysGenerateSurefireReport>
                        </configuration>
                        <reports>
                            <report>report-only</report>
                        </reports>
                    </reportSet>
                    <reportSet>
                        <id>tests</id>
                        <reports>
                            <report>report-only</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <artifactId>maven-pmd-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <id>aggregate-pmd</id>
                        <inherited>false</inherited>
                        <reports>
                            <report>pmd</report>
                            <report>cpd</report>
                        </reports>
                        <configuration>
                            <aggregate>true</aggregate>
                        </configuration>
                    </reportSet>
                    <reportSet>
                        <id>pmd</id>
                        <reports>
                            <report>pmd</report>
                            <report>cpd</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <id>aggregate-checkstyle</id>
                        <inherited>false</inherited>
                        <reports>
                            <report>checkstyle-aggregate</report>
                        </reports>
                    </reportSet>
                    <reportSet>
                        <id>checkstyle</id>
                        <reports>
                            <report>checkstyle</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <id>aggregate-javadoc</id>
                        <inherited>false</inherited>
                        <reports>
                            <report>aggregate-no-fork</report>
                            <report>test-aggregate-no-fork</report>
                        </reports>
                    </reportSet>
                    <reportSet>
                        <id>javadoc</id>
                        <reports>
                            <report>javadoc-no-fork</report>
                            <report>test-javadoc-no-fork</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <id>spotbugs</id>
                        <reports>
                            <report>spotbugs</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>codenarc-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>ossrh</id>
            <properties>
                <gpg.executable>gpg</gpg.executable>
                <gpg.keyname>${env.GPG_KEYNAME}</gpg.keyname>
                <gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
                <gpg.defaultKeyring>false</gpg.defaultKeyring>
                <gpg.homedir>${env.SD_SOURCE_DIR}/screwdriver/deploy</gpg.homedir>
                <gpg.publickeyring>pubring.gpg</gpg.publickeyring>
                <gpg.secretkeyring>secring.gpg</gpg.secretkeyring>
            </properties>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>coverage.build</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>prepare-coverage</id>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                                <configuration>
                                    <propertyName>jacoco.args</propertyName>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>coverage.report</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <reportSets>
                            <reportSet>
                                <id>coverage</id>
                                <reports>
                                    <report>report</report>
                                </reports>
                            </reportSet>
                            <reportSet>
                                <id>aggregate-coverage</id>
                                <inherited>false</inherited>
                                <reports>
                                    <report>report-aggregate</report>
                                </reports>
                            </reportSet>
                        </reportSets>
                    </plugin>
                </plugins>
            </reporting>
        </profile>
        <profile>
            <id>sonar</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <sonar.java.spotbugs.reportPaths>target/spotbugs.xml</sonar.java.spotbugs.reportPaths>
                <sonar.java.pmd.reportPaths>target/pmd.xml</sonar.java.pmd.reportPaths>
                <sonar.java.cpd.reportPaths>target/cpd.xml</sonar.java.cpd.reportPaths>
                <sonar.java.checkstyle.reportPaths>target/checkstyle-result.xml</sonar.java.checkstyle.reportPaths>
                <sonar.coverage.exclusions>
                    **/*Main.java,
                    **/*Params.java
                </sonar.coverage.exclusions>
            </properties>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.sonarsource.scanner.maven</groupId>
                            <artifactId>sonar-maven-plugin</artifactId>
                            <version>3.6.1.1688</version>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
        <profile>
            <id>Jacoco Off</id>
            <activation><activeByDefault>true</activeByDefault></activation>
            <properties>
                    <jacoco.args></jacoco.args>
            </properties>
        </profile>

    </profiles>
</project>
