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

    Copyright The OpenZipkin Authors
    SPDX-License-Identifier: Apache-2.0

-->
<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">
  <parent>
    <groupId>io.zipkin.brave</groupId>
    <artifactId>brave-instrumentation-parent</artifactId>
    <version>6.1.0</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>brave-instrumentation-http-tests</artifactId>
  <name>Brave Instrumentation: Http Interop Tests</name>

  <properties>
    <main.basedir>${project.basedir}/../..</main.basedir>
    <!-- disable errorprone warning that "return this" is not synchronized! -->
    <errorprone.args>-Xep:UnsynchronizedOverridesSynchronized:OFF</errorprone.args>
  </properties>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>brave-instrumentation-http</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>brave-tests</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>${junit-jupiter.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-core</artifactId>
      <version>${log4j2.version}</version>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
    </dependency>
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <!-- Intentionally not the alpha mockwebserver3 until it can coexist with
           okhttp 3, avoiding:
           java.lang.NoSuchMethodError: 'void okhttp3.internal.concurrent.TaskRunner.<init>(okhttp3.internal.concurrent.TaskRunner$Backend, java.util.logging.Logger, int, kotlin.jvm.internal.DefaultConstructorMarker)' -->
      <artifactId>mockwebserver</artifactId>
      <version>${okhttp4.version}</version>
      <exclusions>
        <exclusion>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!-- Override mockwebserver's junit only to squash CVE version -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.2</version>
    </dependency>
    <!-- Only subclasses of ITServletContainer need Jetty. -->
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-servlet</artifactId>
      <version>${jetty.version}</version>
      <optional>true</optional>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Automatic-Module-Name>brave.test.http</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
