<?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">
  <parent>
    <groupId>com.azure</groupId>
    <artifactId>azure-client-sdk-parent</artifactId>
    <version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
    <relativePath>../../parents/azure-client-sdk-parent</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.azure.spring</groupId>
  <artifactId>spring-cloud-azure-stream-binder-eventhubs-core</artifactId>
  <version>4.15.0</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-stream-binder-eventhubs-core;current} -->

  <name>Spring Cloud Azure Stream Binder Event Hubs Core</name>
  <description>Spring Cloud Azure Stream Binder Event Hubs Core</description>
  <url>https://microsoft.github.io/spring-cloud-azure</url>
  <developers>
    <developer>
      <name>Spring Cloud Azure</name>
      <email>SpringIntegSupport@microsoft.com</email>
    </developer>
  </developers>
  <scm>
    <connection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</connection>
    <developerConnection>scm:git:ssh://git@github.com:Azure/azure-sdk-for-java.git</developerConnection>
    <url>https://github.com/Azure/azure-sdk-for-java</url>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/Azure/azure-sdk-for-java/issues</url>
  </issueManagement>

  <dependencies>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-stream</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.springframework.integration</groupId>
          <artifactId>spring-integration-core</artifactId>
        </exclusion>
      </exclusions>
      <version>3.2.9</version> <!-- {x-version-update;org.springframework.cloud:spring-cloud-stream;external_dependency} -->
    </dependency>

    <dependency>
      <groupId>com.azure.spring</groupId>
      <artifactId>spring-integration-azure-eventhubs</artifactId>
      <version>4.15.0</version> <!-- {x-version-update;com.azure.spring:spring-integration-azure-eventhubs;current} -->
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-configuration-processor</artifactId>
      <version>2.7.18</version> <!-- {x-version-update;org.springframework.boot:spring-boot-configuration-processor;external_dependency} -->
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>4.11.0</version><!-- {x-version-update;org.mockito:mockito-core;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <!-- bytebuddy dependencies are required for mockito 4.11.0 to work with Java 21. Mockito 4.11.0 is the last release -->
    <!-- of Mockito supporting Java 8 as a baseline. -->
    <dependency>
      <groupId>net.bytebuddy</groupId>
      <artifactId>byte-buddy</artifactId>
      <version>1.14.8</version> <!-- {x-version-update;testdep_net.bytebuddy:byte-buddy;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.bytebuddy</groupId>
      <artifactId>byte-buddy-agent</artifactId>
      <version>1.14.8</version> <!-- {x-version-update;testdep_net.bytebuddy:byte-buddy-agent;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>5.9.3</version> <!-- {x-version-update;org.junit.jupiter:junit-jupiter;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>5.3.31</version> <!-- {x-version-update;org.springframework:spring-test;external_dependency} -->
      <scope>test</scope>
    </dependency>

    <!-- Added this dependency to include necessary annotations used by reactor core.
            Without this dependency, javadoc throws a warning as it cannot find enum When.MAYBE
            which is used in @Nullable annotation in reactor core classes -->
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>3.0.2</version> <!-- {x-version-update;com.google.code.findbugs:jsr305;external_dependency} -->
      <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-test</artifactId>
        <version>2.7.18</version> <!-- {x-version-update;org.springframework.boot:spring-boot-test;external_dependency} -->
        <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>3.22.0</version> <!-- {x-version-update;org.assertj:assertj-core;external_dependency} -->
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} -->
        <configuration>
          <rules>
            <bannedDependencies>
              <includes>
                <include>org.springframework.boot:spring-boot-configuration-processor:[2.7.18]</include> <!-- {x-include-update;org.springframework.boot:spring-boot-configuration-processor;external_dependency} -->
                <include>org.springframework.cloud:spring-cloud-stream:[3.2.9]</include> <!-- {x-include-update;org.springframework.cloud:spring-cloud-stream;external_dependency} -->
              </includes>
            </bannedDependencies>
          </rules>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.2.2</version> <!-- {x-version-update;org.apache.maven.plugins:maven-jar-plugin;external_dependency} -->
        <configuration>
          <archive>
            <manifestEntries>
              <Automatic-Module-Name>com.azure.spring.cloud.stream.binder.eventhubs.core</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <!-- Generate "spring-configuration-metadata.json" by annotation process -->
    <profile>
      <id>annotation-process-for-java-8</id>
      <activation>
        <jdk>[1.8,9)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.10.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-compiler-plugin;external_dependency} -->
            <executions>
              <execution>
                <id>annotation-process-for-java-8</id>
                <goals>
                  <goal>compile</goal>
                </goals>
                <configuration>
                  <compilerArgs>
                    <arg>-proc:only</arg> <!-- Turn on annotation processing -->
                  </compilerArgs>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>annotation-process-for-java-11</id>
      <activation>
        <jdk>[11,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.10.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-compiler-plugin;external_dependency} -->
            <executions>
              <execution>
                <id>annotation-process-for-java-11</id>
                <goals>
                  <goal>compile</goal>
                </goals>
                <configuration>
                  <compilerArgs>
                    <arg>-proc:only</arg> <!-- Turn on annotation processing -->
                  </compilerArgs>
                  <release>11</release>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
