<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2020 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>6.1.0</version>
    </parent>

    <artifactId>ksqldb-api-client</artifactId>

    <!--
    A note on dependencies.
    The Java client module has a different approach to dependencies than server modules.
    The client is embedded in a user's application so it's really important that:
    * It's small. We don't want to drag in a load of dependencies and make our user's apps big and
    bloated. Also, the user's app might be a lightweight microservice running on a cloud or similar
    where binary size can really matter.
    * We minimise the probability of version conflicts. The more libraries that we depend on the
    greater the risk of a version conflict with a different version of the same library already
    used in the user's app. Version conflicts are a real pain for user's to resolve. It gets worse
    if we're pulling in commonly used libraries such as Apache commons, Guava, Google stuff, etc.
    as the probability of a conflict gets even higher. These ones in particular should really be avoided.
    -->
    <dependencies>
        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-rest-model</artifactId>
            <version>${io.confluent.ksql.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-common</artifactId>
            <version>${io.confluent.ksql.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jdk8</artifactId>
            <version>${jackson.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>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

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

        <!-- Required for running tests -->

        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>common-utils</artifactId>
            <version>${io.confluent.common.version}</version>
            <scope>test</scope>
        </dependency>

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

        <dependency>
            <groupId>io.confluent.ksql</groupId>
            <artifactId>ksqldb-rest-app</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>io.confluent.ksql</groupId>
            <artifactId>ksqldb-engine</artifactId>
            <version>${io.confluent.ksql.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

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

        <!-- Only required to provide LoginModule implementation in tests -->
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-jaas</artifactId>
            <version>${jetty.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <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-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <source>8</source>
                    <reportOutputDirectory>../docs/developer-guide/ksqldb-clients/java-client</reportOutputDirectory>
                    <stylesheetfile>javadoc.css</stylesheetfile>
                    <destDir>api</destDir>
                    <excludePackageNames>*.impl,*.util</excludePackageNames>
                    <additionalOptions>-html5</additionalOptions>
                    <additionalJOptions>
                        <additionalJOption>--allow-script-in-comments</additionalJOption>
                        <additionalJOption>--no-module-directories</additionalJOption>
                    </additionalJOptions>
                    <header><![CDATA[
<a class="docs-home" href="https://docs.ksqldb.io"><img src="https://docs.ksqldb.io/img/logo.png" alt="logo"><span>ksqlDB</span></a>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
-new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
-j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
-'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
-})(window,document,'script','dataLayer','GTM-WRL2Z8Z');</script>]]></header>
                    <footer>&#xA0;</footer> <!-- prevent duplication of the header content -->
                    <doclint>none</doclint>
                    <keywords>true</keywords>
                    <nodeprecated>true</nodeprecated>
                    <nohelp>true</nohelp>
                    <notree>true</notree>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
