<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (c) 2019, 2024 Oracle and/or its affiliates.

    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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.helidon.tracing</groupId>
        <artifactId>helidon-tracing-project</artifactId>
        <version>3.2.7</version>
    </parent>

    <artifactId>helidon-tracing-jaeger</artifactId>
    <name>Helidon Tracing Jaeger</name>

    <description>
        Integration with Jaeger tracing
    </description>

    <dependencies>
        <dependency>
            <groupId>io.helidon.common</groupId>
            <artifactId>helidon-common-configurable</artifactId>
        </dependency>
        <dependency>
            <groupId>io.opentelemetry</groupId>
            <artifactId>opentelemetry-sdk</artifactId>
        </dependency>
        <!-- For dependency convergence of kotlin-stdlib -->
        <dependency>
            <groupId>com.squareup.okio</groupId>
            <artifactId>okio</artifactId>
        </dependency>
        <dependency>
            <groupId>io.opentelemetry</groupId>
            <artifactId>opentelemetry-exporter-jaeger</artifactId>
            <exclusions>
                <!-- For dependency convergence. This excludes the transitive dep
                     on kotlin from okhttp. We defer to the transitive dep from okio -->
                <exclusion>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-stdlib-jdk8</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jetbrains.kotlin</groupId>
                    <artifactId>kotlin-stdlib</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.helidon.tracing</groupId>
            <artifactId>helidon-tracing-opentelemetry</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.common</groupId>
            <artifactId>helidon-common</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.common</groupId>
            <artifactId>helidon-common-context</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.config</groupId>
            <artifactId>helidon-config</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.tracing</groupId>
            <artifactId>helidon-tracing</artifactId>
        </dependency>
        <dependency>
            <!-- redirecting Jaeger slf4j logging to JUL logging -->
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
        </dependency>
        <dependency>
            <groupId>io.helidon.config</groupId>
            <artifactId>helidon-config-metadata</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>io.helidon.config</groupId>
            <artifactId>helidon-config-metadata-processor</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <!-- Hack to get around module issue in okio. See module-info.java -->
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>1.8.0</version>
            <scope>provided</scope>
        </dependency>
        <!--
         - Test dependencies
         -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.helidon.config</groupId>
            <artifactId>helidon-config-yaml</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.helidon.common</groupId>
            <artifactId>helidon-common-http</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.helidon.webserver</groupId>
            <artifactId>helidon-webserver</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.helidon.webclient</groupId>
            <artifactId>helidon-webclient</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.helidon.webclient</groupId>
            <artifactId>helidon-webclient-tracing</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.oracle.bedrock</groupId>
            <artifactId>bedrock-testing-support</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.helidon.common.testing</groupId>
            <artifactId>helidon-common-testing-junit5</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <configuration>
                            <excludes>
                                <exclude>**/B3HeadersPropagationCaseTest.java,**/JaegerBaggagePropagationTest.java</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- Run this test in a separate JVM so we don't init GlobalOpenTelemetry multiple times. -->
                        <id>b3-headers-propagation-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <include>**/B3HeadersPropagationCaseTest.java</include>
                            </includes>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- Run this test in a separate JVM so we don't init GlobalOpenTelemetry multiple times. -->
                        <id>all-headers-propagation-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <includes>
                                <include>**/JaegerBaggagePropagationTest.java</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
