<?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>io.smallrye.reactive</groupId>
    <artifactId>smallrye-reactive-messaging</artifactId>
    <version>4.34.0</version>
  </parent>

  <artifactId>smallrye-reactive-messaging-pulsar</artifactId>

  <name>SmallRye Reactive Messaging : Connector :: Pulsar</name>

  <properties>
    <revapi.skip>true</revapi.skip>
    <pulsar.version>4.1.1</pulsar.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>smallrye-reactive-messaging-provider</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.pulsar</groupId>
      <artifactId>pulsar-client-original</artifactId>
      <version>${pulsar.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-slf4j-impl</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.pulsar</groupId>
      <artifactId>pulsar-client-admin-original</artifactId>
      <version>${pulsar.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.apache.logging.log4j</groupId>
          <artifactId>log4j-slf4j-impl</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>javax.ws.rs</groupId>
      <artifactId>javax.ws.rs-api</artifactId>
      <version>2.1.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.annotation</groupId>
      <artifactId>javax.annotation-api</artifactId>
      <scope>test</scope>
      <version>1.3.2</version>
    </dependency>

    <dependency>
      <groupId>io.smallrye.reactive</groupId>
      <artifactId>smallrye-reactive-messaging-otel</artifactId>
      <version>${project.version}</version>
    </dependency>

    <dependency>
      <groupId>io.smallrye.config</groupId>
      <artifactId>smallrye-config</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.smallrye</groupId>
      <artifactId>smallrye-fault-tolerance</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.smallrye</groupId>
      <artifactId>smallrye-metrics</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.smallrye.reactive</groupId>
      <artifactId>test-common</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-sdk-trace</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.opentelemetry</groupId>
      <artifactId>opentelemetry-sdk-testing</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.smallrye.reactive</groupId>
      <artifactId>smallrye-connector-attribute-processor</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>testcontainers</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.smallrye.reactive</groupId>
      <artifactId>mutiny-zero-reactive-streams-junit5-tck</artifactId>
      <version>${mutiny-zero.version}</version>
      <scope>test</scope>
      <classifier>tests</classifier>
    </dependency>
    <dependency>
      <groupId>org.reactivestreams</groupId>
      <artifactId>reactive-streams-tck</artifactId>
      <version>1.0.4</version>
      <scope>test</scope>
    </dependency>

    <!-- Ensure log4j log backend with slf4j -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-reload4j</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <executions>
          <execution>
            <id>default-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <annotationProcessorPathsUseDepMgmt>true</annotationProcessorPathsUseDepMgmt>
              <annotationProcessorPaths>
                <path>
                  <groupId>org.jboss.logging</groupId>
                  <artifactId>jboss-logging-processor</artifactId>
                  <version>${version.org.jboss.logging-processor}</version>
                </path>
                <path>
                  <groupId>io.smallrye.reactive</groupId>
                  <artifactId>smallrye-connector-attribute-processor</artifactId>
                  <version>${project.version}</version>
                </path>
              </annotationProcessorPaths>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <executions>
          <execution>
            <id>default-test</id>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <!-- Disable TestNG -->
              <testNGArtifactName>none:none</testNGArtifactName>
              <reuseForks>true</reuseForks>
              <systemPropertyVariables>
                <org.jboss.logging.provider>slf4j</org.jboss.logging.provider>
              </systemPropertyVariables>
              <argLine>--add-opens=java.base/sun.net=ALL-UNNAMED</argLine>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <profile>
      <id>coverage</id>
      <properties>
        <argLine>@{jacocoArgLine}</argLine>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.jacoco</groupId>
            <artifactId>jacoco-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
