<?xml version="1.0"?>
<!-- Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
<!-- This module collects all common dependencies of Vespa-internal modules, i.e the non-leaf container modules -->
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.yahoo.vespa</groupId>
    <artifactId>parent</artifactId>
    <version>8.607.21</version>
    <relativePath>../parent/pom.xml</relativePath>
  </parent>
  <name>${project.artifactId}</name>
  <artifactId>container-dev</artifactId>
  <version>8.607.21</version>
  <packaging>jar</packaging>
  <dependencies>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>jdisc_core</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.felix</groupId>
          <artifactId>org.apache.felix.framework</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.felix</groupId>
          <artifactId>org.apache.felix.log</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.felix</groupId>
          <artifactId>org.apache.felix.bundlerepository</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.felix</groupId>
          <artifactId>org.apache.felix.resolver</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.jvnet.hudson</groupId>
          <artifactId>annotation-indexer</artifactId>
        </exclusion>
        <exclusion>
          <groupId>javax.activation</groupId>
          <artifactId>javax.activation-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>config-lib</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.google.inject</groupId>
      <artifactId>guice</artifactId>
      <exclusions>
        <exclusion>
          <groupId>jakarta.inject</groupId>
          <artifactId>jakarta.inject-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>net.java.dev.jna</groupId>
      <artifactId>jna</artifactId>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>provided-dependencies</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>component</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>model-evaluation</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.lz4</groupId>
          <artifactId>lz4-java</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>container-onnxruntime</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>com.microsoft.onnxruntime</groupId>
          <artifactId>onnxruntime</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>container-disc</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>com.google.protobuf</groupId>
          <artifactId>protobuf-java</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.yahoo.vespa</groupId>
          <artifactId>http-utils</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.httpcomponents</groupId>
          <artifactId>httpclient</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.hdrhistogram</groupId>
          <artifactId>HdrHistogram</artifactId>
        </exclusion>
        <exclusion>
          <groupId>io.micrometer</groupId>
          <artifactId>*</artifactId>
        </exclusion>

        <!-- START JETTY embedded jars -->
        <exclusion>
          <groupId>org.eclipse.jetty.http2</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-alpn-java-server</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-alpn-server</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-client</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-http</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-io</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-jmx</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-server</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-util</artifactId>
        </exclusion>
        <!-- END JETTY embedded jars -->
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>vespa-3party-bundles</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>vespajlib</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>net.openhft</groupId>
          <artifactId>zero-allocation-hashing</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.lz4</groupId>
          <artifactId>lz4-java</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-compress</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>defaults</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>container-search-and-docproc</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>com.ibm.icu</groupId>
          <artifactId>icu4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.antlr</groupId>
          <artifactId>antlr4-runtime</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xerces</groupId>
          <artifactId>xercesImpl</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.google.protobuf</groupId>
          <artifactId>protobuf-java</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.commons</groupId>
          <artifactId>commons-math3</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.lz4</groupId>
          <artifactId>lz4-java</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.google.re2j</groupId>
          <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.datasketches</groupId>
          <artifactId>*</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>config-bundle</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>com.yahoo.vespa</groupId>
          <artifactId>http-utils</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.lz4</groupId>
          <artifactId>lz4-java</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>hosted-zone-api</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>jrt</artifactId>
      <version>${project.version}</version>
    </dependency>

    <!-- NOTE: Dependencies below are added explicitly to exclude transitive deps that are not provided runtime by the container,
         and hence make them invisible to user projects' build classpath.
         Excluded artifacts should be added explicitly to the application module to make then visible in users' test classpath. -->
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>opennlp-linguistics</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.opennlp</groupId>
          <artifactId>opennlp-tools</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.google.protobuf</groupId>
          <artifactId>protobuf-java</artifactId>
        </exclusion>
        <exclusion>
          <groupId>com.huaban</groupId>
          <artifactId>jieba-analysis</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.yahoo.vespa</groupId>
      <artifactId>predicate-search-core</artifactId>
      <version>${project.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.antlr</groupId>
          <artifactId>antlr-runtime</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- DO NOT add dependencies here, but above the NOTE! -->
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
              <classpathLayoutType>custom</classpathLayoutType>
              <customClasspathLayout>$${artifact.groupId}:$${artifact.artifactId}:$${artifact.vespa.version}</customClasspathLayout>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.yahoo.vespa</groupId>
        <artifactId>bundle-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>generate-provided-artifact-manifest</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

</project>
