<?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.ksql</groupId>
        <artifactId>ksqldb-parent</artifactId>
        <version>8.0.2</version>
    </parent>

    <artifactId>ksqldb-rest-app</artifactId>

    <properties>
        <air.main.basedir>${project.parent.basedir}</air.main.basedir>
        <main-class>io.confluent.ksql.rest.server.KsqlRestApplication</main-class>
        <cli.skip-execute>false</cli.skip-execute>
        <cli.main-class>${main-class}</cli.main-class>
        <docker.skip-build>true</docker.skip-build>
        <docker.skip-test>true</docker.skip-test>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-rest-model</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>

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

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

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

        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-rocksdb-config-setter</artifactId>
            <version>${io.confluent.ksql.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-testing-tool</artifactId>
            <version>${io.confluent.ksql.version}</version>
        </dependency>

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

        <dependency>
            <groupId>com.github.rvesse</groupId>
            <artifactId>airline</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>connect-json</artifactId>
        </dependency>

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

        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>confluent-log4j2-extensions</artifactId>
            <version>${io.confluent.common.version}</version>
        </dependency>

        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-core</artifactId>
            <version>${vertx.version}</version>
        </dependency>

        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-codegen</artifactId>
            <version>${vertx.version}</version>
        </dependency>

        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-web</artifactId>
            <version>${vertx.version}</version>
        </dependency>

        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-dropwizard-metrics</artifactId>
            <version>${vertx.version}</version>
        </dependency>

        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-web-client</artifactId>
            <version>${vertx.version}</version>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-tcnative-boringssl-static</artifactId>
        </dependency>

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

        <dependency>
            <groupId>org.reactivestreams</groupId>
            <artifactId>reactive-streams</artifactId>
            <version>${reactive-streams.version}</version>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-security</artifactId>
            <version>${jetty.version}</version>
        </dependency>

        <!-- Required for running tests -->

        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-common</artifactId>
            <version>${io.confluent.ksql.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-engine</artifactId>
            <version>${io.confluent.ksql.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-rest-model</artifactId>
            <version>${io.confluent.ksql.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-test-util</artifactId>
            <version>${io.confluent.ksql.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>connect-test-plugins</artifactId>
            <version>${kafka.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <!-- io.yokota is a fork of com.kjetland -->
            <!-- schema-registry is dependent on io.yokota:mbknor-jackson-jsonschema-java8 -->
            <!-- hence all the downstream projects had to use that one only -->
            <groupId>io.yokota</groupId>
            <artifactId>mbknor-jackson-jsonschema-java8</artifactId>
            <version>1.0.39.2</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-stdlib</artifactId>
                </exclusion>
            </exclusions>
        </dependency>


        <dependency>
            <groupId>org.jeasy</groupId>
            <artifactId>easy-random-core</artifactId>
            <version>4.2.0</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgs>
                        <arg>-Xlint:all,-serial</arg>
                        <arg>${compile.warnings-flag}</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/assembly/development.xml</descriptor>
                        <descriptor>src/assembly/package.xml</descriptor>
                        <descriptor>src/assembly/standalone.xml</descriptor>
                    </descriptors>
                    <archive>
                        <manifest>
                            <mainClass>${main-class}</mainClass>
                        </manifest>
                    </archive>
                    <attach>false</attach>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
