<?xml version="1.0" encoding="UTF-8"?>
<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>be.orbinson.osgi</groupId>
        <artifactId>opentelemetry-java</artifactId>
        <version>1.0.3</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>opentelemetry-exporter-sender-okhttp</artifactId>
    <version>1.60.1.0001</version>
    <name>OpenTelemetry - Exporter - Sender OkHttp</name>

    <build>
        <plugins>
            <plugin>
                <groupId>biz.aQute.bnd</groupId>
                <artifactId>bnd-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bnd-process</id>
                        <goals>
                            <goal>bnd-process</goal>
                        </goals>
                        <configuration>
                            <bnd><![CDATA[
                                Bundle-Name: ${project.name}
                                Bundle-SymbolicName: ${project.groupId}.${project.artifactId}

                                # We are using okhttp as sender, which does not have a dependency on grpc
                                Import-Package: io.grpc*;resolution:=optional,*

                                # Override parent: only include sender-okhttp jar and only export its packages
                                # (sdk-common is provided for bnd classpath resolution so that correct Provide-Capability headers are generated)
                                Export-Package: io.opentelemetry.exporter.sender.okhttp.*
                                -includeresource: @opentelemetry-exporter-sender-okhttp-*.jar;lib:=true
                           ]]></bnd>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>io.opentelemetry</groupId>
            <artifactId>opentelemetry-exporter-sender-okhttp</artifactId>
            <version>1.60.1</version>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- Needed on classpath so bnd can resolve the HttpSenderProvider/GrpcSenderProvider service interfaces for -metainf-services -->
        <dependency>
            <groupId>io.opentelemetry</groupId>
            <artifactId>opentelemetry-sdk-common</artifactId>
            <version>1.60.1</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</project>
