<?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>

  <groupId>com.datasqrl</groupId>
  <artifactId>sqrl-root</artifactId>
  <version>0.10.6</version>
  <packaging>pom</packaging>

  <name>SQRL</name>
  <description>DataSQRL is a data streaming framework for incremental and real-time data processing applications.
    Ingest, transform, store, and serve data as iceberg views, data APIs, or LLM tooling with the simplicity of SQL.</description>
  <url>https://docs.datasqrl.com/</url>

  <inceptionYear>2021</inceptionYear>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Daniel Henneberger</name>
      <email>daniel@datasqrl.com</email>
      <url>https://github.com/henneberger</url>
    </developer>

    <developer>
      <name>Ferenc Csaky</name>
      <email>ferenc@datasqrl.com</email>
      <url>https://github.com/ferenc-csaky</url>
    </developer>

    <developer>
      <name>Marvin Froeder</name>
      <email>marvin@datasqrl.com</email>
      <url>https://github.com/velo</url>
    </developer>

    <developer>
      <name>Matthias Broecheler</name>
      <email>matthias@datasqrl.com</email>
      <url>https://github.com/mbroecheler</url>
    </developer>
  </developers>

  <modules>
    <module>sqrl-cli</module>
    <module>sqrl-discovery</module>
    <module>sqrl-planner</module>
    <module>sqrl-server</module>
    <module>sqrl-testing</module>
  </modules>

  <scm>
    <connection>scm:git:https://github.com/DataSQRL/sqrl.git</connection>
    <developerConnection>scm:git:https://github.com/DataSQRL/sqrl.git</developerConnection>
    <tag>HEAD</tag>
    <url>https://github.com/DataSQRL/sqrl</url>
  </scm>

  <distributionManagement>
    <repository>
      <id>github</id>
      <url>https://maven.pkg.github.com/DataSQRL/sqrl</url>
    </repository>
    <snapshotRepository>
      <id>github</id>
      <url>https://maven.pkg.github.com/DataSQRL/sqrl</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <!-- Flink runner props -->
    <flinkrunner.version>0.10.3</flinkrunner.version>
    <flinkrunner.image.repo>docker.io</flinkrunner.image.repo>

    <!-- Params -->
    <docker.image.repo>datasqrl</docker.image.repo>
    <docker.image.tag>local</docker.image.tag>
    <docker.image.base.tag>latest</docker.image.base.tag>
    <docker.image.duckdb.tag>latest</docker.image.duckdb.tag>
    <snapshots.update>false</snapshots.update>

    <!-- Flink versions -->
    <flink.version>2.2.1</flink.version>
    <flink-client.version>1.1.4</flink-client.version>

    <!-- Dependency versions -->
    <agroal.version>3.2</agroal.version>
    <antlr.version>4.13.2</antlr.version>
    <assertj.version>3.27.7</assertj.version>
    <autoservice.version>1.1.1</autoservice.version>
    <avro.version>1.12.1</avro.version>
    <awaitility.version>4.3.0</awaitility.version>
    <aws-msk-iam-auth.version>2.3.7</aws-msk-iam-auth.version>
    <aws-sdk-bom.version>2.46.10</aws-sdk-bom.version>
    <commons-collections4.version>4.5.0</commons-collections4.version>
    <commons-csv.version>1.14.1</commons-csv.version>
    <commons-exec.version>1.6.0</commons-exec.version>
    <commons-io.version>2.22.0</commons-io.version>
    <duckdb.version>1.5.3.0</duckdb.version>
    <feign.version>13.13</feign.version>
    <freemarker.version>2.3.34</freemarker.version>
    <glassfish.version>3.0.0</glassfish.version>
    <graphql-java-extended-scalars.version>24.0</graphql-java-extended-scalars.version>
    <graphql-java.version>26.0</graphql-java.version>
    <graphql-micrometer.version>1.0.1</graphql-micrometer.version>
    <guava.version>33.6.0-jre</guava.version>
    <h2.version>2.4.240</h2.version>
    <spring-framework.version>7.0.8</spring-framework.version>
    <hikari.version>7.1.0</hikari.version>
    <!-- Do not touch Hadoop version unless it has been updated on the Flink side.
         Otherwise, it might break the Flink filesystem integration. -->
    <hadoop.version>3.3.4</hadoop.version>
    <httpcomponents.version>4.5.14</httpcomponents.version>
    <iceberg.version>1.11.0</iceberg.version>
    <jackson.version>2.22.0</jackson.version>
    <jacoco.version>0.8.15</jacoco.version>
    <jakarta.annotation.version>3.0.0</jakarta.annotation.version>
    <jakarta.inject.version>2.0.1</jakarta.inject.version>
    <javax.validation.version>2.0.1.Final</javax.validation.version>
    <jjwt.version>0.13.0</jjwt.version>
    <json-schema.version>2.0.1</json-schema.version>
    <junit.jupiter.version>6.1.0</junit.jupiter.version>
    <kafka.version>3.9.1</kafka.version>
    <log4j.version>2.26.0</log4j.version>
    <lombok.version>1.18.46</lombok.version>
    <mcp-sdk.version>0.18.2</mcp-sdk.version>
    <micrometer.version>1.17.0</micrometer.version>
    <mockito.version>4.8.0</mockito.version>
    <mustache.version>0.9.14</mustache.version>
    <openai-gpt3-java.version>0.18.2</openai-gpt3-java.version>
    <opencsv.version>5.12.0</opencsv.version>
    <picocli.version>4.7.7</picocli.version>
    <postgres.version>42.7.11</postgres.version>
    <projectreactor.version>3.8.6</projectreactor.version>
    <protobuf.version>4.35.1</protobuf.version>
    <scala.version>2.12</scala.version>
    <scram.version>2.1</scram.version>
    <slf4j.version>1.7.36</slf4j.version>
    <snowflake-jdbc.version>4.3.0</snowflake-jdbc.version>
    <snakeyaml.version>2.6</snakeyaml.version>
    <swagger-core.version>2.2.51</swagger-core.version>
    <system-stubs.version>2.1.8</system-stubs.version>
    <testcontainers.version>2.0.5</testcontainers.version>
    <vertx.version>5.1.2</vertx.version>

    <!-- Plugin versions -->
    <docker-maven-plugin.version>0.48.1</docker-maven-plugin.version>
    <easy-jacoco-maven-plugin.version>0.1.4</easy-jacoco-maven-plugin.version>
    <git-code-format-maven-plugin.version>5.6</git-code-format-maven-plugin.version>
    <license-maven-plugin.version>5.0.0</license-maven-plugin.version>
    <maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
    <maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
    <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
    <sortpom.plugin.version>4.0.0</sortpom.plugin.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- BOMs -->
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>bom</artifactId>
        <version>${aws-sdk-bom.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Make sure the Jackson BOM precedes the Vert.x one, otherwise Jackson version will be used from Vert.x -->
      <dependency>
        <groupId>io.vertx</groupId>
        <artifactId>vertx-dependencies</artifactId>
        <version>${vertx.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit.jupiter.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- SQRL deps, please keep this in order -->
      <dependency>
        <groupId>com.datasqrl</groupId>
        <artifactId>sqrl-server-core</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl</groupId>
        <artifactId>sqrl-server-vertx-base</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl</groupId>
        <artifactId>sqrl-server-vertx</artifactId>
        <version>${project.version}</version>
      </dependency>

      <!-- planner -->
      <dependency>
        <groupId>com.datasqrl</groupId>
        <artifactId>sqrl-planner</artifactId>
        <version>${project.version}</version>
      </dependency>
      <!-- tests -->
      <dependency>
        <groupId>com.datasqrl</groupId>
        <artifactId>sqrl-testing-integration</artifactId>
        <version>${project.version}</version>
      </dependency>
      <!-- tools -->
      <dependency>
        <groupId>com.datasqrl</groupId>
        <artifactId>sqrl-cli</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl</groupId>
        <artifactId>sqrl-discovery</artifactId>
        <version>${project.version}</version>
      </dependency>
      <!-- sqrl test jars-->
      <dependency>
        <groupId>com.datasqrl</groupId>
        <artifactId>sqrl-cli</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.datasqrl</groupId>
        <artifactId>sqrl-planner</artifactId>
        <version>${project.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>

      <!-- Test utils -->
      <dependency>
        <groupId>com.theokanning.openai-gpt3-java</groupId>
        <artifactId>service</artifactId>
        <version>0.18.2</version>
        <scope>test</scope>
      </dependency>

      <!-- General utils -->
      <dependency>
        <groupId>org.yaml</groupId>
        <artifactId>snakeyaml</artifactId>
        <version>${snakeyaml.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.protobuf</groupId>
        <artifactId>protobuf-java</artifactId>
        <version>${protobuf.version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>${guava.version}</version>
      </dependency>
      <dependency>
        <groupId>org.antlr</groupId>
        <artifactId>antlr4-runtime</artifactId>
        <version>${antlr.version}</version>
      </dependency>
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${lombok.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.google.auto.service</groupId>
        <artifactId>auto-service</artifactId>
        <version>${autoservice.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-collections4</artifactId>
        <version>${commons-collections4.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-csv</artifactId>
        <version>${commons-csv.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-exec</artifactId>
        <version>${commons-exec.version}</version>
      </dependency>
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpmime</artifactId>
        <version>${httpcomponents.version}</version>
      </dependency>
      <dependency>
        <groupId>info.picocli</groupId>
        <artifactId>picocli</artifactId>
        <version>${picocli.version}</version>
      </dependency>
      <dependency>
        <groupId>com.esotericsoftware.kryo</groupId>
        <artifactId>kryo</artifactId>
        <version>2.24.0</version>
      </dependency>

      <dependency>
        <groupId>com.graphql-java</groupId>
        <artifactId>graphql-java</artifactId>
        <version>${graphql-java.version}</version>
      </dependency>

      <dependency>
        <groupId>com.graphql-java</groupId>
        <artifactId>graphql-java-extended-scalars</artifactId>
        <version>${graphql-java-extended-scalars.version}</version>
      </dependency>

      <!-- required for vertx subscriptions -->
      <dependency>
        <groupId>io.projectreactor</groupId>
        <artifactId>reactor-core</artifactId>
        <version>${projectreactor.version}</version>
      </dependency>
      <!-- vertx metrics -->
      <dependency>
        <groupId>io.micrometer</groupId>
        <artifactId>micrometer-registry-prometheus</artifactId>
        <version>${micrometer.version}</version>
      </dependency>
      <!-- required for vertx jdbc -->
      <dependency>
        <groupId>io.agroal</groupId>
        <artifactId>agroal-pool</artifactId>
        <version>${agroal.version}</version>
      </dependency>
      <dependency>
        <groupId>com.zaxxer</groupId>
        <artifactId>HikariCP</artifactId>
        <version>${hikari.version}</version>
      </dependency>

      <!-- validation -->
      <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>${javax.validation.version}</version>
      </dependency>

      <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.el</artifactId>
        <version>${glassfish.version}</version>
      </dependency>

      <!-- Flink -->
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-core</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-table-common</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-runtime-web</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-streaming-java</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-csv</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-json</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-avro</artifactId>
        <version>${flink.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-table-runtime</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-table-api-java-bridge</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-table-planner_2.12</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-clients</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-statebackend-rocksdb</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-hadoop-fs</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-s3-fs-hadoop</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-connector-files</artifactId>
        <version>${flink.version}</version>
      </dependency>

      <!-- calcite -->
      <dependency>
        <groupId>org.immutables</groupId>
        <artifactId>value</artifactId>
        <version>2.12.2</version>
        <scope>compile</scope>
      </dependency>

      <!-- stream: csv -->
      <dependency>
        <groupId>com.opencsv</groupId>
        <artifactId>opencsv</artifactId>
        <version>${opencsv.version}</version>
      </dependency>

      <!-- stream: sources -->
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-clients</artifactId>
        <version>${kafka.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-clients</artifactId>
        <version>${kafka.version}</version>
        <classifier>test</classifier>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka_${scala.version}</artifactId>
        <version>${kafka.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka_${scala.version}</artifactId>
        <version>${kafka.version}</version>
        <classifier>test</classifier>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-streams</artifactId>
        <version>${kafka.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-streams</artifactId>
        <version>${kafka.version}</version>
        <classifier>test</classifier>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.kafka</groupId>
        <artifactId>kafka-streams-test-utils</artifactId>
        <version>${kafka.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- formats -->
      <dependency>
        <groupId>org.apache.avro</groupId>
        <artifactId>avro</artifactId>
        <version>${avro.version}</version>
      </dependency>

      <!-- database: postgres -->
      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-codec</artifactId>
        <version>4.2.15.Final</version>
      </dependency>
      <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>${postgres.version}</version>
      </dependency>
      <!-- postgres required libs -->
      <dependency>
        <groupId>com.ongres.scram</groupId>
        <artifactId>common</artifactId>
        <version>${scram.version}</version>
      </dependency>
      <dependency>
        <groupId>com.ongres.scram</groupId>
        <artifactId>client</artifactId>
        <version>${scram.version}</version>
      </dependency>

      <!-- database: h2 -->
      <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>${h2.version}</version>
      </dependency>

      <!-- JSON Schema -->
      <dependency>
        <groupId>com.networknt</groupId>
        <artifactId>json-schema-validator</artifactId>
        <version>${json-schema.version}</version>
      </dependency>

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

      <dependency>
        <groupId>com.github.spullara.mustache.java</groupId>
        <artifactId>compiler</artifactId>
        <version>${mustache.version}</version>
      </dependency>

      <!-- testing -->
      <dependency>
        <groupId>org.awaitility</groupId>
        <artifactId>awaitility</artifactId>
        <version>${awaitility.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-inline</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-junit-jupiter</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers-junit-jupiter</artifactId>
        <version>${testcontainers.version}</version>
        <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>org.testcontainers</groupId>
        <artifactId>testcontainers-postgresql</artifactId>
        <version>${testcontainers.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers-kafka</artifactId>
        <version>${testcontainers.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers-redpanda</artifactId>
        <version>${testcontainers.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers</artifactId>
        <version>${testcontainers.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>uk.org.webcompere</groupId>
        <artifactId>system-stubs-jupiter</artifactId>
        <version>${system-stubs.version}</version>
        <scope>test</scope>
      </dependency>

      <!-- logging -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>${log4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>${log4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-slf4j-impl</artifactId>
        <version>${log4j.version}</version>
      </dependency>

      <!-- build -->
      <dependency>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.15.0</version>
      </dependency>

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

      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>env-utils</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>flexible-csv-format</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>flexible-json-format</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>stdlib-utils</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>stdlib-commons</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>stdlib-json</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>stdlib-text</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>stdlib-math</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>stdlib-openai</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>stdlib-vector</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>kafka-safe-connector</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>postgresql-connector</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
      <dependency>
        <groupId>com.datasqrl.flinkrunner</groupId>
        <artifactId>flink-sql-runner</artifactId>
        <version>${flinkrunner.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- common test infra-->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>github</id>
      <url>https://maven.pkg.github.com/DataSQRL/flink-sql-runner</url>
    </repository>
  </repositories>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.6.2</version>
        </plugin>
        <plugin>
          <groupId>io.reactiverse</groupId>
          <artifactId>vertx-maven-plugin</artifactId>
          <version>2.1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.12.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>3.6.3</version>
        </plugin>
        <plugin>
          <groupId>io.fabric8</groupId>
          <artifactId>docker-maven-plugin</artifactId>
          <version>${docker-maven-plugin.version}</version>
          <configuration>
            <images>
              <image>
                <name>${docker.image.name}:${docker.image.tag}</name>
                <build>
                  <contextDir>${project.basedir}</contextDir>
                  <dockerFile>Dockerfile</dockerFile>
                  <filter>false</filter>
                  <args>
                    <IMG_REPO>${docker.image.repo}</IMG_REPO>
                    <BASE_TAG>${docker.image.base.tag}</BASE_TAG>
                    <DUCKDB_EXTENSIONS_TAG>${docker.image.duckdb.tag}</DUCKDB_EXTENSIONS_TAG>
                  </args>
                </build>
              </image>
            </images>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${jacoco.version}</version>
        <configuration>
          <excludes>
            <exclude>org/**</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>com.marvinformatics.jacoco</groupId>
        <artifactId>easy-jacoco-maven-plugin</artifactId>
        <version>0.1.4</version>
        <configuration>
          <projectRules>
            <rule>
              <limits>
                <limit>
                  <counter>INSTRUCTION</counter>
                  <value>COVEREDRATIO</value>
                  <minimum>0.70</minimum>
                </limit>
              </limits>
            </rule>
          </projectRules>
          <projectExtraProperties>
            <license.skip>true</license.skip>
          </projectExtraProperties>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.6.3</version>
        <executions>
          <execution>
            <id>enforce-slf4j-version</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <bannedDependencies>
                  <searchTransitive>true</searchTransitive>
                  <includes>
                    <include>*:*</include>
                  </includes>
                  <excludes>
                    <!-- Ban SLF4J 2.x bridge to ensure only SLF4J 1.x is used -->
                    <exclude>org.apache.logging.log4j:log4j-slf4j2-impl</exclude>
                    <exclude>org.slf4j:slf4j-reload4j</exclude>
                  </excludes>
                  <message>SLF4J 2.x is not allowed. Use log4j-slf4j-impl instead of log4j-slf4j2-impl</message>
                </bannedDependencies>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.3.1</version>
        <configuration>
          <tagNameFormat>v@{project.version}</tagNameFormat>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <pushChanges>true</pushChanges>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.15.0</version>
        <configuration>
          <release>17</release>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.5.0</version>
        <configuration>
          <!-- do not build an empty jar if the project is
               e.g. a pom project -->
          <skipIfEmpty>true</skipIfEmpty>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              <addClasspath>false</addClasspath>
            </manifest>
          </archive>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.5.6</version>
        <configuration>
          <includes>
            <include>**/*Test.java</include>
          </includes>
          <environmentVariables>
            <TZ>America/Los_Angeles</TZ>
          </environmentVariables>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>3.5.6</version>
        <configuration>
          <includes>
            <include>**/*IT.java</include>
          </includes>
          <environmentVariables>
            <TZ>America/Los_Angeles</TZ>
          </environmentVariables>
          <systemPropertyVariables>
            <flinkrunner.image.repo>${flinkrunner.image.repo}</flinkrunner.image.repo>
            <flinkrunner.version>${flinkrunner.version}</flinkrunner.version>
          </systemPropertyVariables>
          <argLine>${argLine}
            --add-opens=java.base/java.util=ALL-UNNAMED
            --add-opens=java.base/java.lang=ALL-UNNAMED
            --add-opens=java.base/java.io=ALL-UNNAMED
            --add-opens=java.base/java.nio=ALL-UNNAMED
            --add-opens=java.base/java.net=ALL-UNNAMED</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>
        <version>${license-maven-plugin.version}</version>
        <configuration>
          <properties>
            <owner>DataSQRL</owner>
            <email>contact@datasqrl.com</email>
          </properties>
          <licenseSets>
            <licenseSet>
              <header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
              <excludes>
                <exclude>**/src/**/org/apache/flink/**</exclude>
                <exclude>**/src/test/resources/**</exclude>
                <exclude>**/resources/templates/init-project/**</exclude>
                <exclude>**/resources/templates/functions/**</exclude>
                <exclude>**/m2e-target/**</exclude>
                <exclude>bin/**</exclude>
                <exclude>documentation/**/index_features_list.txt</exclude>
              </excludes>
            </licenseSet>
          </licenseSets>
          <strictCheck>true</strictCheck>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin-git</artifactId>
            <version>${license-maven-plugin.version}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>check</id>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>compile</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.cosium.code</groupId>
        <artifactId>git-code-format-maven-plugin</artifactId>
        <version>${git-code-format-maven-plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>com.cosium.code</groupId>
            <artifactId>google-java-format</artifactId>
            <version>${git-code-format-maven-plugin.version}</version>
          </dependency>
        </dependencies>
        <executions>
          <!-- On commit, format the modified files -->
          <execution>
            <id>install-formatter-hook</id>
            <goals>
              <goal>install-hooks</goal>
            </goals>
            <!-- inherited = false means it won't re-run in submodules if not desired -->
            <inherited>false</inherited>
          </execution>
          <!-- On Maven verify, fail if code is not formatted -->
          <execution>
            <id>validate-code-format</id>
            <goals>
              <goal>validate-code-format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.github.ekryd.sortpom</groupId>
        <artifactId>sortpom-maven-plugin</artifactId>
        <version>${sortpom.plugin.version}</version>
        <configuration>
          <keepBlankLines>true</keepBlankLines>
          <lineSeparator>\n</lineSeparator>
          <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
          <createBackupFile>false</createBackupFile>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>update-snapshots</id>
      <properties>
        <snapshots.update>true</snapshots.update>
      </properties>
    </profile>

    <profile>
      <id>skip-shade-plugin</id>
      <activation>
        <property>
          <name>skipFatjar</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>io.reactiverse</groupId>
            <artifactId>vertx-maven-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>m2e</id>
      <activation>
        <property>
          <name>m2e.version</name>
        </property>
      </activation>

      <properties>
        <argLine></argLine>
      </properties>

      <build>
        <directory>${project.basedir}/m2e-target</directory>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>3.6.1</version>
            <executions>
              <execution>
                <id>add-source</id>
                <goals>
                  <goal>add-source</goal>
                </goals>
                <phase>generate-sources</phase>
                <configuration>
                  <sources>
                    <source>target/generated-sources/annotations</source>
                    <source>target/generated-sources/java</source>
                  </sources>
                </configuration>
              </execution>
              <execution>
                <id>add-google-auto</id>
                <goals>
                  <goal>add-resource</goal>
                </goals>
                <phase>generate-sources</phase>
                <configuration>
                  <resources>
                    <resource>
                      <directory>target/classes</directory>
                      <excludes>
                        <exclude>**/*.class</exclude>
                      </excludes>
                    </resource>
                  </resources>
                </configuration>
              </execution>
              <execution>
                <id>add-test-source</id>
                <goals>
                  <goal>add-test-source</goal>
                </goals>
                <phase>generate-test-sources</phase>
                <configuration>
                  <sources>
                    <source>target/generated-test-sources/test-annotations</source>
                  </sources>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.central</groupId>
            <artifactId>central-publishing-maven-plugin</artifactId>
            <version>0.10.0</version>
            <extensions>true</extensions>
            <configuration>
              <publishingServerId>central</publishingServerId>

              <excludeArtifacts>
                <!-- client jars are too large, skipping uploading for now -->
                <excludeArtifact>sqrl-server-vertx</excludeArtifact>
                <excludeArtifact>sqrl-cli</excludeArtifact>
                <excludeArtifact>sqrl-test</excludeArtifact>
                <excludeArtifact>sqrl-run</excludeArtifact>
              </excludeArtifacts>

              <autoPublish>true</autoPublish>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>${maven-source-plugin.version}</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${maven-javadoc-plugin.version}</version>
            <configuration>
              <failOnError>false</failOnError>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>package</phase>
                <configuration>
                  <show>public</show>
                  <failOnError>false</failOnError>
                  <detectOfflineLinks>false</detectOfflineLinks>
                  <doclint>all,-missing</doclint>
                  <nohelp>true</nohelp>
                  <excludePackageNames>*.internal.*,testutil,demo</excludePackageNames>
                  <quiet>true</quiet>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>dev</id>
      <properties>
        <gcf.skipInstallHooks>false</gcf.skipInstallHooks>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>com.cosium.code</groupId>
            <artifactId>git-code-format-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>format-code</id>
                <goals>
                  <goal>format-code</goal>
                </goals>
                <phase>initialize</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.github.ekryd.sortpom</groupId>
            <artifactId>sortpom-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>format</id>
                <goals>
                  <goal>sort</goal>
                </goals>
                <phase>initialize</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>format</id>
                <goals>
                  <goal>format</goal>
                </goals>
                <phase>initialize</phase>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
              <redirectTestOutputToFile>true</redirectTestOutputToFile>
            </configuration>
          </plugin>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <configuration>
              <failIfNoSpecifiedTests>false</failIfNoSpecifiedTests>
              <redirectTestOutputToFile>true</redirectTestOutputToFile>
              <rerunFailingTestsCount>1</rerunFailingTestsCount>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- just compile, skip all other checks -->
      <id>quickbuild</id>
      <properties>
        <skipTests>true</skipTests>
        <enforcer.skip>true</enforcer.skip>
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <gcf.skip>true</gcf.skip>
        <license.skip>true</license.skip>
      </properties>
    </profile>
    <profile>
      <id>skip-dockerfile-plugin</id>
      <activation>
        <property>
          <name>skipFatjar</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>docker-maven-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <!-- "Only" profiles - activate specific job types and skip everything else -->
    <profile>
      <!-- skip all other tests, only run unit tests -->
      <id>only-unit-tests</id>
      <activation>
        <property>
          <name>onlyUTs</name>
        </property>
      </activation>
      <properties>
        <skipITs>true</skipITs>
        <docker.skip>true</docker.skip>
        <maven.test.excludeProjects>sqrl-testing-container</maven.test.excludeProjects>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>io.reactiverse</groupId>
            <artifactId>vertx-maven-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- skip all other tests, only run integration tests -->
      <id>only-integration-tests</id>
      <activation>
        <property>
          <name>onlyITs</name>
        </property>
      </activation>
      <properties>
        <docker.skip>true</docker.skip>
        <maven.test.excludeProjects>sqrl-testing-container</maven.test.excludeProjects>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>io.reactiverse</groupId>
            <artifactId>vertx-maven-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- skip all other tests, only run container tests -->
      <id>only-container-e2e</id>
      <activation>
        <property>
          <name>onlyContainerE2E</name>
        </property>
      </activation>
      <properties>
        <skipTests>true</skipTests>
        <skipITs>true</skipITs>
      </properties>
    </profile>
    <profile>
      <!-- builds docker images using maven -->
      <id>only-images</id>
      <activation>
        <property>
          <name>onlyImages</name>
        </property>
      </activation>
      <properties>
        <skipTests>true</skipTests>
        <skipITs>true</skipITs>
      </properties>
    </profile>
    <profile>
      <!-- builds the shaded JARs, but not the images -->
      <id>only-jars</id>
      <activation>
        <property>
          <name>onlyJars</name>
        </property>
      </activation>
      <properties>
        <skipTests>true</skipTests>
        <skipITs>true</skipITs>
        <docker.skip>true</docker.skip>
      </properties>
    </profile>
  </profiles>

</project>
