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

    Copyright (C) 2026 Philip Helger (www.helger.com)
    philip[at]helger[dot]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>
  <parent>
    <groupId>com.helger.phoss.ap</groupId>
    <artifactId>phoss-ap-parent-pom</artifactId>
    <version>0.10.0</version>
  </parent>
  <artifactId>phoss-ap-otel</artifactId>
  <packaging>jar</packaging>
  <name>phoss-ap-otel</name>
  <description>Peppol Access Point - OpenTelemetry integration</description>
  <url>https://github.com/phax/phoss-ap/phoss-ap-otel</url>
  <inceptionYear>2026</inceptionYear>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <dependencies>
    <dependency>
      <groupId>com.helger.phoss.ap</groupId>
      <artifactId>phoss-ap-api</artifactId>
    </dependency>

    <!-- Generic ph-telemetry -> OpenTelemetry binding; transitively brings ph-telemetry +
         opentelemetry-api. -->
    <dependency>
      <groupId>com.helger.telemetry</groupId>
      <artifactId>ph-telemetry-otel</artifactId>
    </dependency>
    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-sdk</artifactId>
    </dependency>
    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-sdk-extension-autoconfigure</artifactId>
    </dependency>
    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-exporter-otlp</artifactId>
    </dependency>
    <!-- okhttp 5.x splits its artifact via Kotlin Multiplatform: the plain
         "okhttp" jar pulled transitively is an empty stub, and Maven (unlike
         Gradle) does not resolve the JVM variant. Add okhttp-jvm explicitly
         so okhttp3.RequestBody is on the classpath for the OTLP sender. -->
    <dependency>
      <groupId>com.squareup.okhttp3</groupId>
      <artifactId>okhttp-jvm</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>io.opentelemetry.instrumentation</groupId>
      <artifactId>opentelemetry-instrumentation-annotations</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
</project>
