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

    Copyright © 2021 DataSQRL (contact@datasqrl.com)

    Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS 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>com.datasqrl</groupId>
    <artifactId>sqrl-server</artifactId>
    <version>0.10.6</version>
  </parent>

  <artifactId>sqrl-server-vertx-base</artifactId>
  <name>SQRL :: Server :: Vert.x Base</name>

  <dependencies>
    <dependency>
      <groupId>com.datasqrl</groupId>
      <artifactId>sqrl-server-core</artifactId>
    </dependency>
    <dependency>
      <groupId>com.datasqrl.flinkrunner</groupId>
      <artifactId>env-utils</artifactId>
    </dependency>
    <dependency>
      <groupId>com.datasqrl.flinkrunner</groupId>
      <artifactId>stdlib-vector</artifactId>
    </dependency>
    <dependency>
      <groupId>com.datasqrl.flinkrunner</groupId>
      <artifactId>stdlib-openai</artifactId>
    </dependency>

    <!-- Vertx -->
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-config</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-auth-jwt</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-auth-properties</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-auth-oauth2</artifactId>
    </dependency>
    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-api</artifactId>
      <version>${jakarta.annotation.version}</version>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-jdbc-client</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-health-check</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-micrometer-metrics</artifactId>
    </dependency>
    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-registry-prometheus</artifactId>
    </dependency>
    <dependency>
      <groupId>com.symbaloo</groupId>
      <artifactId>graphql-micrometer</artifactId>
      <version>${graphql-micrometer.version}</version>
    </dependency>

    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-junit5</artifactId>
      <scope>test</scope>
      <!-- JUnit 4 is no longer necessary, so we exclude it -->
      <exclusions>
        <exclusion>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web-client</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-web-graphql</artifactId>
    </dependency>
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-pg-client</artifactId>
    </dependency>
    <dependency>
      <groupId>io.agroal</groupId>
      <artifactId>agroal-pool</artifactId>
    </dependency>
    <dependency>
      <groupId>com.zaxxer</groupId>
      <artifactId>HikariCP</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.flink</groupId>
      <artifactId>flink-table-planner_2.12</artifactId>
      <exclusions>
        <!-- Exclude distributed/cluster dependencies not needed for server-side function execution -->
        <exclusion>
          <groupId>org.apache.flink</groupId>
          <artifactId>flink-streaming-java</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.flink</groupId>
          <artifactId>flink-table-api-java-bridge</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.flink</groupId>
          <artifactId>flink-cep</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.flink</groupId>
          <artifactId>flink-shaded-asm-9</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.flink</groupId>
          <artifactId>flink-shaded-jackson</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.flink</groupId>
          <artifactId>flink-shaded-netty</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.scala-lang</groupId>
          <artifactId>scala-compiler</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.scala-lang</groupId>
          <artifactId>scala-reflect</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.jayway.jsonpath</groupId>
          <artifactId>json-path</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.esotericsoftware</groupId>
          <artifactId>kryo</artifactId>
        </exclusion>
        <exclusion>
          <groupId>commons-collections</groupId>
          <artifactId>commons-collections</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-compress</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-lang3</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-text</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.snakeyaml</groupId>
          <artifactId>snakeyaml-engine</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.immutables</groupId>
          <artifactId>value</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.immutables</groupId>
          <artifactId>value-annotations</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.janino</groupId>
          <artifactId>commons-compiler</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.codehaus.janino</groupId>
          <artifactId>janino</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.ibm.icu</groupId>
          <artifactId>icu4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <!-- sinks -->
    <dependency>
      <groupId>io.vertx</groupId>
      <artifactId>vertx-kafka-client</artifactId>
    </dependency>
    <dependency>
      <groupId>software.amazon.msk</groupId>
      <artifactId>aws-msk-iam-auth</artifactId>
      <version>${aws-msk-iam-auth.version}</version>
    </dependency>
    <dependency>
      <groupId>io.projectreactor</groupId>
      <artifactId>reactor-core</artifactId>
    </dependency>

    <dependency>
      <groupId>io.netty</groupId>
      <artifactId>netty-codec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.duckdb</groupId>
      <artifactId>duckdb_jdbc</artifactId>
      <version>${duckdb.version}</version>
    </dependency>
    <dependency>
      <groupId>net.snowflake</groupId>
      <artifactId>snowflake-jdbc</artifactId>
      <version>${snowflake-jdbc.version}</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jsr310</artifactId>
    </dependency>
    <!-- TODO: the drivers can be loaded by the jar assembly -->
    <!-- logging -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-slf4j-impl</artifactId>
    </dependency>

    <dependency>
      <groupId>org.postgresql</groupId>
      <artifactId>postgresql</artifactId>
    </dependency>

    <!-- Test -->
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers-postgresql</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers-kafka</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- JSON Schema validation -->
    <dependency>
      <groupId>com.networknt</groupId>
      <artifactId>json-schema-validator</artifactId>
    </dependency>

    <!-- Swagger OpenAPI dependencies -->
    <dependency>
      <groupId>io.swagger.core.v3</groupId>
      <artifactId>swagger-core</artifactId>
      <version>${swagger-core.version}</version>
    </dependency>
    <dependency>
      <groupId>io.swagger.core.v3</groupId>
      <artifactId>swagger-models</artifactId>
      <version>${swagger-core.version}</version>
    </dependency>
    <dependency>
      <groupId>io.swagger.core.v3</groupId>
      <artifactId>swagger-annotations</artifactId>
      <version>${swagger-core.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>io.reactiverse</groupId>
        <artifactId>vertx-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>initialize</id>
            <goals>
              <goal>initialize</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
