<?xml version="1.0"?>
<!-- Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<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.yahoo.vespa</groupId>
    <artifactId>parent</artifactId>
    <version>8.508.17</version>
    <relativePath>../parent/pom.xml</relativePath>
  </parent>
  <artifactId>model-integration</artifactId>
  <version>8.508.17</version>
  <packaging>container-plugin</packaging>

  <dependencyManagement>
    <dependencies>
      <!-- START: Transitive dependencies for openai-java -->
      <!-- Override scope from 'runtime' to 'provided' -->
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>${jackson2.vespa.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jdk8</artifactId>
        <version>${jackson2.vespa.version}</version>
        <scope>provided</scope>
      </dependency>

      <!-- Override scope from 'runtime' to 'compile' -->
      <dependency>
        <groupId>com.squareup.okhttp3</groupId>
        <artifactId>okhttp</artifactId>
        <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>com.squareup.okhttp3</groupId>
        <artifactId>logging-interceptor</artifactId>
        <scope>compile</scope>
      </dependency>
      <!-- END: Transitive dependencies for openai-java -->

    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!--
      Note: model-integration is included in config-model.
      Exclude all dependencies here which are not needed there in fat-model-dependencies.
    -->
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>annotations</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>config-model-api</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <!-- required for bundle-plugin to generate import-package statements for Java's standard library + misc 3party -->
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>jdisc_core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>container-disc</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>searchcore</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>searchlib</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>vespajlib</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>linguistics</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>linguistics-components</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>container-onnxruntime</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>container-llama</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>component</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>configdefinitions</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>container-core</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>metrics</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.google.protobuf</groupId>
      <artifactId>protobuf-java</artifactId>
    </dependency>

    <dependency>
      <groupId>com.openai</groupId>
      <artifactId>openai-java</artifactId>
      <version>${openai-java.vespa.version}</version>
      <exclusions>
        <exclusion>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jetbrains</groupId>
          <artifactId>annotations</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.httpcomponents.core5</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.httpcomponents.client5</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <!-- Included for openai-java. Using dependencyManagement does not force correct version for tenant base poms -->
      <groupId>com.fasterxml.jackson.module</groupId>
      <artifactId>jackson-module-kotlin</artifactId>
      <version>${jackson2.vespa.version}</version>
      <scope>compile</scope>
      <exclusions>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-databind</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-annotations</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.fasterxml.jackson.core</groupId>
          <artifactId>jackson-core</artifactId>
        </exclusion>
    </exclusions>
    </dependency>
    
     <!-- include com.fasterxml.jackson.databind -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>${jackson2.vespa.version}</version>
      <scope>provided</scope>
    </dependency>
    <!--  include jackson.datatype jdk8 -->
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jdk8</artifactId>
      <version>${jackson2.vespa.version}</version>
      <scope>provided</scope>
    </dependency>
    <!-- Add these explicitly as provided -->
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>${jackson2.vespa.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>${jackson2.vespa.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <!-- For openai-java -->
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>container-apache-http-client-bundle</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.lz4</groupId>
      <artifactId>lz4-java</artifactId>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.vintage</groupId>
      <artifactId>junit-vintage-engine</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>com.yahoo.vespa</groupId>
        <artifactId>bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <!-- defines package 'com.yahoo.embedding' which is also defined in 'configdefinitions' -->
          <suppressWarningOverlappingPackages>true</suppressWarningOverlappingPackages>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.github.os72</groupId>
        <artifactId>protoc-jar-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.yahoo.vespa</groupId>
        <artifactId>abi-check-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>io.github.tulipcc</groupId>
        <artifactId>tulipcc-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

</project>
