<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2018 Confluent Inc.
  ~
  ~ Licensed under the Confluent Community License (the "License"); you may not use
  ~ this file except in compliance with the License.  You may obtain a copy of the
  ~ License at
  ~
  ~ http://www.confluent.io/confluent-community-license
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  ~ WARRANTIES OF ANY KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations under the 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>

    <parent>
        <groupId>io.confluent</groupId>
        <artifactId>rest-utils-parent</artifactId>
        <version>5.2.7</version>
    </parent>

    <groupId>io.confluent.ksql</groupId>
    <artifactId>ksql-parent</artifactId>
    <packaging>pom</packaging>
    <name>ksql-parent</name>
    <version>5.2.7</version>
    <licenses>
        <license>
            <name>Confluent Community License</name>
            <url>http://www.confluent.io/confluent-community-license</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <modules>
        <module>ksql-udf</module>
        <module>ksql-common</module>
        <module>ksql-udf-quickstart</module>
        <module>ksql-serde</module>
        <module>ksql-metastore</module>
        <module>ksql-parser</module>
        <module>ksql-engine</module>
        <module>ksql-tools</module>
        <module>ksql-cli</module>
        <module>ksql-examples</module>
        <module>ksql-rest-app</module>
        <module>ksql-version-metrics-client</module>
        <module>ksql-console-scripts</module>
        <module>ksql-etc</module>
        <module>ksql-package</module>
        <module>ksql-test-util</module>
        <module>ksql-benchmark</module>
    </modules>

    <repositories>
        <repository>
            <id>confluent</id>
            <url>http://packages.confluent.io/maven/</url>
        </repository>
        <repository>
            <id>confluent-snapshots</id>
            <url>https://s3-us-west-2.amazonaws.com/confluent-snapshots/</url>
        </repository>
        <repository>
            <id>redhat-repo</id>
            <url>https://maven.repository.redhat.com/ga/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>confluent</id>
            <url>http://packages.confluent.io/maven/</url>
        </pluginRepository>
        <pluginRepository>
            <id>confluent-snapshots</id>
            <url>https://s3-us-west-2.amazonaws.com/confluent-snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <properties>
        <apache.directory.server.version>2.0.0-M22</apache.directory.server.version>
        <apache.directory.api.version>1.0.0-M33</apache.directory.api.version>
        <confluent.maven.repo>http://packages.confluent.io/maven/</confluent.maven.repo>
        <exec-maven-plugin.version>1.2.1</exec-maven-plugin.version>
        <podam.version>6.0.2.RELEASE</podam.version>
        <airlift.version>0.29</airlift.version>
        <airline.version>2.6.0</airline.version>
        <antlr.version>4.7.1</antlr.version>
        <csv.version>1.4</csv.version>
        <commons.compress.version>1.21</commons.compress.version>
        <lang3.version>3.3.1</lang3.version>
        <guava.version>30.1.1-jre</guava.version>
        <inject.version>1</inject.version>
        <janino.version>3.0.7</janino.version>
        <jline.version>3.11.0</jline.version>
        <jna.version>4.4.0</jna.version>
        <jsr305.version>3.0.2</jsr305.version>
        <maven.plugins.version>3.0.0-M1</maven.plugins.version>
        <really.executable.jar.version>1.5.0</really.executable.jar.version>
        <generext.version>1.0.2</generext.version>
        <avro.random.generator.version>0.2.2</avro.random.generator.version>
        <apache.curator.version>2.9.0</apache.curator.version>
        <jackson.mapper.asl.version>1.9.14.jdk17-redhat-00001</jackson.mapper.asl.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Cross-submodule dependencies -->

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>ksql-common</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>ksql-udf</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>ksql-serde</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>ksql-metastore</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>ksql-cli</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>ksql-engine</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>ksql-parser</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>ksql-examples</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>ksql-rest-app</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>ksql-version-metrics-client</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.ksql</groupId>
                <artifactId>package-ksql</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- End cross-submodule dependencies -->

            <!-- Confluent dependencies -->
            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>kafka-connect-avro-converter</artifactId>
                <version>${confluent.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>kafka-json-serializer</artifactId>
                <version>${confluent.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>rest-utils</artifactId>
                <version>${confluent.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>kafka-avro-serializer</artifactId>
                <version>${confluent.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>kafka-schema-registry-client</artifactId>
                <version>${confluent.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent.support</groupId>
                <artifactId>support-metrics-common</artifactId>
                <version>${confluent.version}</version>
            </dependency>

            <dependency>
                <groupId>io.confluent</groupId>
                <artifactId>common-utils</artifactId>
                <version>${confluent.version}</version>
            </dependency>
            <!-- End Confluent dependencies -->

            <dependency>
                <groupId>com.github.rvesse</groupId>
                <artifactId>airline</artifactId>
                <version>${airline.version}</version>
            </dependency>

            <dependency>
                <groupId>com.google.code.findbugs</groupId>
                <artifactId>jsr305</artifactId>
                <version>${jsr305.version}</version>
            </dependency>

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

            <dependency>
                <groupId>io.airlift</groupId>
                <artifactId>slice</artifactId>
                <version>${airlift.version}</version>
            </dependency>

            <dependency>
                <groupId>javax.inject</groupId>
                <artifactId>javax.inject</artifactId>
                <version>${inject.version}</version>
            </dependency>

            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>jna</artifactId>
                <version>${jna.version}</version>
            </dependency>

            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-runtime</artifactId>
                <version>${antlr.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.avro</groupId>
                <artifactId>avro</artifactId>
                <version>${avro.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-mapper-asl</artifactId>
                <version>${jackson.mapper.asl.version}</version>
            </dependency>

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

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

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

            <dependency>
                <groupId>org.codehaus.janino</groupId>
                <artifactId>janino</artifactId>
                <version>${janino.version}</version>
            </dependency>

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

            <!-- Required for running tests -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava-testlib</artifactId>
                <version>${guava.version}</version>
                <scope>test</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Every child project uses slf4j/log4j for logging, might as well just include them here automatically -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </dependency>

            <!-- Use a repackaged version of log4j with security patches. Default log4j v1.2 is a transitive dependency of slf4j-log4j12, but it is excluded in common/pom.xml -->
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>confluent-log4j</artifactId>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <configuration>
                        <tarLongFileMode>posix</tarLongFileMode>
                        <descriptors>
                            <descriptor>src/assembly/package.xml</descriptor>
                        </descriptors>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>${exec-maven-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-Xlint:all,-options,-path</arg>
                        <arg>-parameters</arg>
                        <arg>-Werror</arg>
                    </compilerArgs>
                </configuration>
            </plugin>

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

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>java</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>${spotbugs.maven.plugin.version}</version>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                    <excludeFilterFile>findbugs/findbugs-exclude.xml</excludeFilterFile>
                    <effort>Max</effort>
                    <threshold>Max</threshold>
                    <failOnError>true</failOnError>
                    <includeTests>true</includeTests>
                </configuration>
                <executions>
                    <!--
                    Ensures that FindBugs inspects source code when project is compiled.
                -->
                    <execution>
                        <id>analyze-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>

        </plugins>
    </reporting>
</project>
