<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2020 Graylog, Inc.

    This program is free software: you can redistribute it and/or modify
    it under the terms of the Server Side Public License, version 1,
    as published by MongoDB, Inc.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    Server Side Public License for more details.

    You should have received a copy of the Server Side Public License
    along with this program. If not, see
    <http://www.mongodb.com/licensing/server-side-public-license>.

-->
<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>
    <modules>
        <module>../graylog2-server</module>
        <module>../full-backend-tests</module>
    </modules>

    <parent>
        <groupId>org.graylog</groupId>
        <artifactId>graylog-parent</artifactId>
        <version>6.3.5</version>
    </parent>

    <artifactId>graylog-project-parent</artifactId>
    <packaging>pom</packaging>

    <name>Graylog Project Parent POM</name>
    <description>Graylog Project Parent POM</description>
    <url>https://www.graylog.org/</url>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice-bom</artifactId>
                <version>${guice.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.glassfish.hk2</groupId>
                <artifactId>hk2-bom</artifactId>
                <version>${hk2.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.glassfish.jersey</groupId>
                <artifactId>jersey-bom</artifactId>
                <version>${jersey.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.rholder</groupId>
                <artifactId>guava-retrying</artifactId>
                <version>${guava-retrying.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.zafarkhaja</groupId>
                <artifactId>java-semver</artifactId>
                <version>${java-semver.version}</version>
            </dependency>
            <dependency>
                <groupId>org.graylog.repackaged</groupId>
                <artifactId>semver4j</artifactId>
                <version>${semver4j.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>${caffeine.version}</version>
            </dependency>
            <dependency>
                <groupId>org.cryptomator</groupId>
                <artifactId>siv-mode</artifactId>
                <version>${siv-mode.version}</version>
            </dependency>
            <dependency>
                <groupId>io.prometheus</groupId>
                <artifactId>simpleclient_bom</artifactId>
                <version>${prometheus-client.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.reflections</groupId>
                <artifactId>reflections</artifactId>
                <version>${reflections.version}</version>
            </dependency>

            <dependency>
                <groupId>org.graylog2</groupId>
                <artifactId>syslog4j</artifactId>
                <version>${syslog4j.version}</version>
            </dependency>

            <!-- Cmdline and configuration -->
            <dependency>
                <groupId>org.graylog</groupId>
                <artifactId>jadconfig</artifactId>
                <version>${jadconfig.version}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.ws.rs</groupId>
                <artifactId>jakarta.ws.rs-api</artifactId>
                <version>${jakarta.ws.rs-api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate.validator</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>${hibernate-validator.version}</version>
            </dependency>

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

            <dependency>
                <groupId>io.github.classgraph</groupId>
                <artifactId>classgraph</artifactId>
                <version>${classgraph.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.directory.api</groupId>
                <artifactId>api-all</artifactId>
                <version>${apache-directory-version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.graylog.shaded</groupId>
                <artifactId>kafka09_2.11</artifactId>
                <version>${kafka09.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.jmx</groupId>
                        <artifactId>jmxri</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.sun.jdmk</groupId>
                        <artifactId>jmxtools</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>javax.jms</groupId>
                        <artifactId>jms</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>log4j</groupId>
                        <artifactId>log4j</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-log4j12</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.kafka</groupId>
                <artifactId>kafka-clients</artifactId>
                <version>${kafka.version}</version>
            </dependency>

            <dependency>
                <groupId>com.rabbitmq</groupId>
                <artifactId>amqp-client</artifactId>
                <version>${amqp-client.version}</version>
            </dependency>

            <dependency>
                <groupId>com.lmax</groupId>
                <artifactId>disruptor</artifactId>
                <version>${disruptor.version}</version>
            </dependency>

            <dependency>
                <groupId>org.graylog2.repackaged</groupId>
                <artifactId>uuid</artifactId>
                <version>${uuid.version}</version>
            </dependency>
            <dependency>
                <groupId>de.huxhorn.sulky</groupId>
                <artifactId>de.huxhorn.sulky.ulid</artifactId>
                <version>${ulid.version}</version>
            </dependency>

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

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-email</artifactId>
                <version>${commons-email.version}</version>
            </dependency>

            <dependency>
                <groupId>commons-validator</groupId>
                <artifactId>commons-validator</artifactId>
                <version>${commons-validator.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>net.sf.opencsv</groupId>
                <artifactId>opencsv</artifactId>
                <version>${opencsv.version}</version>
            </dependency>

            <dependency>
                <groupId>com.joestelmach</groupId>
                <artifactId>natty</artifactId>
                <version>${natty.version}</version>
                <exclusions>
                    <!-- Getting rid of commons-logging in a transitive dependency of com.joestelmach:natty -->
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.floreysoft</groupId>
                <artifactId>jmte</artifactId>
                <version>${jmte.version}</version>
                <exclusions>
                    <!-- Exclude the ancient asm:asm version because it conflicts with the org.ow2.asm:asm version. -->
                    <exclusion>
                        <groupId>asm</groupId>
                        <artifactId>asm</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>jakarta.annotation</groupId>
                <artifactId>jakarta.annotation-api</artifactId>
                <version>${jakarta.annotation-api.version}</version>
            </dependency>

            <dependency>
                <groupId>jakarta.inject</groupId>
                <artifactId>jakarta.inject-api</artifactId>
                <version>${jakarta.inject.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>${jaxb-api.version}</version>
            </dependency>

            <dependency>
                <groupId>net.jcip</groupId>
                <artifactId>jcip-annotations</artifactId>
                <version>${jcip-annotations.version}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.graylog2</groupId>
                <artifactId>gelfclient</artifactId>
                <version>${gelfclient.version}</version>
            </dependency>

            <dependency>
                <groupId>com.github.rvesse</groupId>
                <artifactId>airline</artifactId>
                <version>${airline.version}</version>
            </dependency>
            <dependency>
                <groupId>org.graylog.repackaged</groupId>
                <artifactId>os-platform-finder</artifactId>
                <version>${os-platform-finder.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hdrhistogram</groupId>
                <artifactId>HdrHistogram</artifactId>
                <version>${HdrHistogram.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.oshi</groupId>
                <artifactId>oshi-core</artifactId>
                <version>${oshi.version}</version>
            </dependency>
            <dependency>
                <groupId>org.graylog2.repackaged</groupId>
                <artifactId>grok</artifactId>
                <version>${grok.version}</version>
            </dependency>
            <dependency>
                <groupId>io.swagger</groupId>
                <artifactId>swagger-annotations</artifactId>
                <version>${swagger.version}</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>retrofit</artifactId>
                <version>${retrofit.version}</version>
            </dependency>
            <dependency>
                <groupId>com.squareup.retrofit2</groupId>
                <artifactId>converter-jackson</artifactId>
                <version>${retrofit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mindrot</groupId>
                <artifactId>jbcrypt</artifactId>
                <version>${jbcrypt.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.validation</groupId>
                <artifactId>jakarta.validation-api</artifactId>
                <version>${validation-api.version}</version>
            </dependency>
            <dependency>
                <groupId>com.maxmind.geoip2</groupId>
                <artifactId>geoip2</artifactId>
                <version>${geoip2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.graylog.cef</groupId>
                <artifactId>cef-parser</artifactId>
                <version>${cef-parser.version}</version>
            </dependency>
            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-runtime</artifactId>
                <version>${antlr.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jooq</groupId>
                <artifactId>jool</artifactId>
                <version>${jool.version}</version>
            </dependency>
            <dependency>
                <groupId>org.freemarker</groupId>
                <artifactId>freemarker</artifactId>
                <version>${freemarker.version}</version>
            </dependency>
            <dependency>
                <groupId>one.util</groupId>
                <artifactId>streamex</artifactId>
                <version>${streamex.version}</version>
            </dependency>
            <dependency>
                <groupId>info.leadinglight</groupId>
                <artifactId>jdot</artifactId>
                <version>${jdot.version}</version>
            </dependency>
            <dependency>
                <groupId>com.unboundid</groupId>
                <artifactId>unboundid-ldapsdk</artifactId>
                <version>${unboundid-ldap.version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.stateless4j</groupId>
                <artifactId>stateless4j</artifactId>
                <version>${stateless4j.version}</version>
            </dependency>

            <!-- Tracing dependencies -->
            <dependency>
                <groupId>io.opentelemetry</groupId>
                <artifactId>opentelemetry-bom</artifactId>
                <version>${opentelemetry.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>io.opentelemetry.instrumentation</groupId>
                <artifactId>opentelemetry-instrumentation-annotations</artifactId>
                <version>${opentelemetry.version}</version>
            </dependency>
            <dependency>
                <groupId>software.amazon.msk</groupId>
                <artifactId>aws-msk-iam-auth</artifactId>
                <version>${aws-msk-iam-auth.version}</version>
                <exclusions>
                    <exclusion>
                        <artifactId>commons-logging</artifactId>
                        <groupId>commons-logging</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <!-- Test dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj-core.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-joda-time</artifactId>
                <version>${assertj-joda-time.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.rest-assured</groupId>
                <artifactId>rest-assured</artifactId>
                <version>${restassured.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>io.rest-assured</groupId>
                <artifactId>json-path</artifactId>
                <version>${restassured.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers-bom</artifactId>
                <version>${testcontainers.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.jukito</groupId>
                <artifactId>jukito</artifactId>
                <version>${jukito.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>nl.jqno.equalsverifier</groupId>
                <artifactId>equalsverifier</artifactId>
                <version>${equalsverifier.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-test-framework</artifactId>
                <version>${apacheds-server.version}</version>
                <scope>test</scope>
                <exclusions>
                    <!-- Exclude api-ldap-schema-data to avoid startup error with the embedded apache-ds -->
                    <exclusion>
                        <groupId>org.apache.directory.api</groupId>
                        <artifactId>api-ldap-schema-data</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.bouncycastle</groupId>
                        <artifactId>bcprov-jdk15on</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.bouncycastle</groupId>
                        <artifactId>bcpkix-jdk15on</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>ldap-client-test</artifactId>
                <version>${apacheds-server.version}</version>
                <scope>test</scope>
                <exclusions>
                    <!-- Exclude api-ldap-schema-data to avoid startup error with the embedded apache-ds -->
                    <exclusion>
                        <groupId>org.apache.directory.api</groupId>
                        <artifactId>api-ldap-schema-data</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.github.stefanbirkner</groupId>
                <artifactId>system-rules</artifactId>
                <version>${system-rules.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.squareup.okhttp3</groupId>
                <artifactId>mockwebserver</artifactId>
                <version>${okhttp.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>io.pkts</groupId>
                <artifactId>pkts-core</artifactId>
                <version>${pkts.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.cronutils</groupId>
                <artifactId>cron-utils</artifactId>
                <version>${cron-utils.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${license-maven.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <forkCount>1</forkCount>
                    <reuseForks>true</reuseForks>
                    <argLine>-Dio.netty.leakDetectionLevel=paranoid -Djava.awt.headless=true</argLine>
                    <excludes>
                        <exclude>**/*IntegrationTest.java</exclude>
                        <exclude>**/*IT.java</exclude>
                    </excludes>
                    <includes>
                        <include>**/*Spec.class</include>
                        <include>**/*Test.class</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <forkCount>1</forkCount>
                    <skip>false</skip>
                    <argLine>-Djava.awt.headless=true</argLine>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>java8-disable-strict-javadoc</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <doclint>none</doclint>
                <quiet>true</quiet>
            </properties>
        </profile>
        <profile>
            <!--
             Why the strange name? Glad you've asked! It's just so that yours truly
             is able to run `mvn -Pedantic package` on the command line. :-)
            -->
            <id>edantic</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.spotbugs</groupId>
                        <artifactId>spotbugs-maven-plugin</artifactId>
                        <configuration>
                            <excludeFilterFile>config/spotbugs-exclude.xml</excludeFilterFile>
                            <effort>Max</effort>
                            <threshold>Default</threshold>
                            <failOnError>false</failOnError>
                            <xmlOutput>true</xmlOutput>
                            <plugins>
                                <plugin>
                                    <groupId>com.h3xstream.findsecbugs</groupId>
                                    <artifactId>findsecbugs-plugin</artifactId>
                                    <version>1.14.0</version>
                                </plugin>
                                <plugin>
                                    <groupId>com.mebigfatguy.fb-contrib</groupId>
                                    <artifactId>fb-contrib</artifactId>
                                    <version>7.6.10</version>
                                </plugin>
                            </plugins>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-pmd-plugin</artifactId>
                        <configuration>
                            <targetJdk>${maven.compiler.target}</targetJdk>
                            <failurePriority>1</failurePriority>
                            <printFailingErrors>true</printFailingErrors>
                            <linkXRef>false</linkXRef>
                            <excludeRoots>
                                <excludeRoot>${project.build.directory}/generated-sources</excludeRoot>
                                <excludeRoot>${project.build.directory}/generated-test-sources</excludeRoot>
                            </excludeRoots>
                            <rulesets>
                                <ruleset>/rulesets/java/maven-pmd-plugin-default.xml</ruleset>
                                <ruleset>../config/pmd-rules.xml</ruleset>
                            </rulesets>
                        </configuration>
                        <executions>
                            <execution>
                                <phase>
                                    validate
                                </phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
