<?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-actuator-autoconfigure</artifactId>
  <version>5.13.0</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-actuator-autoconfigure;current} -->

  <name>Spring Cloud Azure Actuator AutoConfigure</name>
  <description>Spring Cloud Azure Starter Actuator AutoConfigure</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>
  <properties>
    <!-- Enables fail on deprecated API usage. -->
    <compiler.failondeprecatedstatus/>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-actuator-autoconfigure</artifactId>
      <version>3.3.0</version> <!-- {x-version-update;org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} -->
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.17.1</version> <!-- {x-version-update;com.fasterxml.jackson.core:jackson-databind;external_dependency} -->
    </dependency>
    <dependency>
      <groupId>com.azure.spring</groupId>
      <artifactId>spring-cloud-azure-actuator</artifactId>
      <version>5.13.0</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-actuator;current} -->
    </dependency>
    <dependency>
      <groupId>com.azure.spring</groupId>
      <artifactId>spring-cloud-azure-autoconfigure</artifactId>
      <version>5.13.0</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} -->
    </dependency>
    <dependency>
      <groupId>com.azure.spring</groupId>
      <artifactId>spring-cloud-azure-appconfiguration-config-web</artifactId>
      <version>5.13.0</version><!-- {x-version-update;com.azure.spring:spring-cloud-azure-appconfiguration-config-web;current} -->
      <optional>true</optional>
    </dependency>

    <!-- Azure SDKs-->
    <!-- Explicitly referencing azure-core.  It's possible that the dependent versions below conflict with our
    currently released version and a lower version is resolved. -->
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-core</artifactId>
      <version>1.49.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-cosmos</artifactId>
      <version>4.61.0</version> <!-- {x-version-update;com.azure:azure-cosmos;dependency} -->
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-data-appconfiguration</artifactId>
      <version>1.6.1</version> <!-- {x-version-update;com.azure:azure-data-appconfiguration;dependency} -->
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-messaging-eventhubs</artifactId>
      <version>5.18.4</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;dependency} -->
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-security-keyvault-certificates</artifactId>
      <version>4.6.3</version> <!-- {x-version-update;com.azure:azure-security-keyvault-certificates;dependency} -->
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-security-keyvault-secrets</artifactId>
      <version>4.8.3</version> <!-- {x-version-update;com.azure:azure-security-keyvault-secrets;dependency} -->
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-storage-blob</artifactId>
      <version>12.26.0</version> <!-- {x-version-update;com.azure:azure-storage-blob;dependency} -->
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-storage-file-share</artifactId>
      <version>12.22.0</version> <!-- {x-version-update;com.azure:azure-storage-file-share;dependency} -->
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-storage-queue</artifactId>
      <version>12.21.0</version> <!-- {x-version-update;com.azure:azure-storage-queue;dependency} -->
      <optional>true</optional>
    </dependency>

    <!-- For Testing -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <version>3.3.0</version> <!-- {x-version-update;org.springframework.boot:spring-boot-starter-test;external_dependency} -->
      <scope>test</scope>
    </dependency>

    <!-- Add mockito-core 4.11.0 to work with Java 21 -->
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>5.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.16</version> <!-- {x-version-update;net.bytebuddy:byte-buddy;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.bytebuddy</groupId>
      <artifactId>byte-buddy-agent</artifactId>
      <version>1.14.16</version> <!-- {x-version-update;net.bytebuddy:byte-buddy-agent;external_dependency} -->
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>4.8.2.0</version> <!-- {x-version-update;com.github.spotbugs:spotbugs-maven-plugin;external_dependency} -->
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>2.30.0</version> <!-- {x-version-update;com.diffplug.spotless:spotless-maven-plugin;external_dependency} -->
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.revapi</groupId>
        <artifactId>revapi-maven-plugin</artifactId>
        <version>0.14.6</version> <!-- {x-version-update;org.revapi:revapi-maven-plugin;external_dependency} -->
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>com.azure.tools</groupId>
        <artifactId>codesnippet-maven-plugin</artifactId>
        <version>1.0.0-beta.10</version> <!-- {x-version-update;com.azure.tools:codesnippet-maven-plugin;external_dependency} -->
        <configuration>
          <skip>true</skip>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.13.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-compiler-plugin;external_dependency} -->
        <executions>
          <!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) -->
          <execution>
            <id>base-modules-compile</id>
            <phase>none</phase>
          </execution>
          <!-- disabled - compile without module-info for Java 8 -->
          <execution>
            <id>base-compile</id>
            <phase>none</phase>
          </execution>
          <!-- disabled - compile with Java 8 -->
          <execution>
            <id>base-testCompile</id>
            <phase>none</phase>
          </execution>
          <!-- Ensure we compile with Java 17 -->
          <execution>
            <goals>
              <goal>compile</goal>
            </goals>
            <configuration>
              <release>17</release>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.4.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} -->
        <configuration>
          <rules>
            <bannedDependencies>
              <includes>
                <include>com.fasterxml.jackson.core:jackson-databind:[2.17.1]</include> <!-- {x-include-update;com.fasterxml.jackson.core:jackson-databind;external_dependency} -->
                <include>org.springframework.boot:spring-boot-actuator:[3.3.0]</include> <!-- {x-include-update;org.springframework.boot:spring-boot-actuator;external_dependency} -->
                <include>org.springframework.boot:spring-boot-actuator-autoconfigure:[3.3.0]</include> <!-- {x-include-update;org.springframework.boot:spring-boot-actuator-autoconfigure;external_dependency} -->
              </includes>
            </bannedDependencies>
          </rules>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.4.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-jar-plugin;external_dependency} -->
        <configuration>
          <archive>
            <manifestEntries>
              <Automatic-Module-Name>com.azure.spring.cloud.actuator.autoconfigure</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
        <!-- START: Empty Java Doc & Sources -->
        <!-- The following code will generate an empty javadoc/sources with just a README.md. This is necessary
             to pass the required checks on Maven. The way this works is by setting the classesDirectory
             to a directory that only contains the README.md, which we need to copy. If the classesDirectory
             is set to the root, where the README.md lives, it still won't have javadocs/sources but the jar file
             will contain a bunch of files that shouldn't be there. The faux sources directory is deleted
             and recreated with the README.md being copied every time to guarantee that, when building locally,
             it'll have the latest copy of the README.md file.
        -->
        <executions>
          <execution>
            <id>empty-javadoc-jar-with-readme</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>javadoc</classifier>
              <classesDirectory>${project.basedir}/javadocTemp</classesDirectory>
            </configuration>
          </execution>
          <execution>
            <id>empty-source-jar-with-readme</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <classifier>sources</classifier>
              <classesDirectory>${project.basedir}/sourceTemp</classesDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>3.1.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-antrun-plugin;external_dependency} -->
        <executions>
          <execution>
            <id>copy-readme-to-javadocTemp-and-sourceTemp</id>
            <phase>prepare-package</phase>
            <configuration>
              <target>
                <echo>Deleting existing ${project.basedir}/javadocTemp and
                  ${project.basedir}/sourceTemp</echo>
                <delete includeEmptyDirs="true" quiet="true">
                  <fileset dir="${project.basedir}/javadocTemp"/>
                  <fileset dir="${project.basedir}/sourceTemp"/>
                </delete>
                <echo>Copying ${project.basedir}/../README.md to
                  ${project.basedir}/javadocTemp/README.md
                </echo>
                <copy file="${project.basedir}/../README.md" tofile="${project.basedir}/javadocTemp/README.md" failonerror="false"/>
                <echo>Copying ${project.basedir}/../README.md to
                  ${project.basedir}/sourceTemp/README.md
                </echo>
                <copy file="${project.basedir}/../README.md" tofile="${project.basedir}/sourceTemp/README.md" failonerror="false"/>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
        <!-- END: Empty Java Doc & Sources -->
      </plugin>
    </plugins>

  </build>

</project>
