<?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</groupId>
  <artifactId>azure-storage-blob</artifactId>
  <version>12.13.0</version> <!-- {x-version-update;com.azure:azure-storage-blob;current} -->

  <name>Microsoft Azure client library for Blob Storage</name>
  <description>This module contains client library for Microsoft Azure Blob Storage.</description>
  <url>https://github.com/Azure/azure-sdk-for-java</url>

  <distributionManagement>
    <site>
      <id>azure-java-build-docs</id>
      <url>${site.url}/site/${project.artifactId}</url>
    </site>
  </distributionManagement>

  <scm>
    <url>scm:git:https://github.com/Azure/azure-sdk-for-java</url>
    <connection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</connection>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <src.dir>src/main/java</src.dir>
    <test.dir>src/test/java</test.dir>
  </properties>

  <pluginRepositories>
    <pluginRepository>
      <id>bintray</id>
      <name>Groovy Bintray</name>
      <url>https://dl.bintray.com/groovy/maven</url>
      <releases>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <dependencies>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-core</artifactId>
      <version>1.17.0</version> <!-- {x-version-update;com.azure:azure-core;dependency} -->
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-core-http-netty</artifactId>
      <version>1.10.0</version> <!-- {x-version-update;com.azure:azure-core-http-netty;dependency} -->
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-storage-common</artifactId>
      <version>12.12.0</version> <!-- {x-version-update;com.azure:azure-storage-common;current} -->
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-storage-internal-avro</artifactId>
      <version>12.0.5</version> <!-- {x-version-update;com.azure:azure-storage-internal-avro;current} -->
    </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>com.azure</groupId>
      <artifactId>azure-storage-common</artifactId>
      <version>12.12.0</version> <!-- {x-version-update;com.azure:azure-storage-common;current} -->
      <classifier>tests</classifier>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-core-test</artifactId>
      <version>1.6.3</version> <!-- {x-version-update;com.azure:azure-core-test;dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.azure</groupId>
      <artifactId>azure-identity</artifactId>
      <version>1.3.0</version> <!-- {x-version-update;com.azure:azure-identity;dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.projectreactor</groupId>
      <artifactId>reactor-test</artifactId>
      <version>3.4.6</version> <!-- {x-version-update;io.projectreactor:reactor-test;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.microsoft.azure</groupId>
      <artifactId>adal4j</artifactId>
      <version>1.6.5</version> <!-- {x-version-update;com.microsoft.azure:adal4j;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.spockframework</groupId>
      <artifactId>spock-core</artifactId>
      <version>2.0-M4-groovy-2.5</version> <!-- {x-version-update;org.spockframework:spock-core;external_dependency} -->
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>cglib</groupId>
      <artifactId>cglib-nodep</artifactId>
      <version>3.2.7</version> <!-- {x-version-update;cglib:cglib-nodep;external_dependency} -->
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <testSourceDirectory>src/test/java</testSourceDirectory>
    <testResources>
      <testResource>
        <directory>${basedir}/src/test/resources</directory>
      </testResource>
    </testResources>
  </build>

  <profiles>
    <profile>
      <id>java8</id>
      <activation>
        <jdk>[1.8,9)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-compiler-plugin;external_dependency} -->
            <configuration>
              <source>1.8</source>
              <target>1.8</target>
              <showWarnings>true</showWarnings>
              <failOnWarning>true</failOnWarning>
              <compilerArgs>
                <arg>-Xlint:all</arg>
                <arg>-Xlint:-serial</arg>
                <arg>-Xlint:-deprecation</arg>
                <arg>-Xlint:-processing</arg>
              </compilerArgs>
              <excludes>
                <exclude>module-info.java</exclude>
              </excludes>
            </configuration>

            <executions>
              <execution>
                <id>test-compile</id>
                <phase>process-test-sources</phase>
                <goals>
                  <goal>testCompile</goal>
                </goals>
                <configuration>
                  <compilerId>groovy-eclipse-compiler</compilerId>
                  <compilerArgs>-warn:-unused</compilerArgs>
                </configuration>
              </execution>
              <execution>
                <id>default-testCompile</id>
                <phase>process-test-sources</phase>
                <goals>
                  <goal>testCompile</goal>
                </goals>
                <configuration>
                  <compilerId>groovy-eclipse-compiler</compilerId>
                  <compilerArgs>-warn:-unused</compilerArgs>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-eclipse-compiler</artifactId>
                <version>3.4.0-01</version> <!-- {x-version-update;org.codehaus.groovy:groovy-eclipse-compiler;external_dependency} -->
              </dependency>
              <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-eclipse-batch</artifactId>
                <version>2.5.8-01</version> <!-- {x-version-update;org.codehaus.groovy:groovy-eclipse-batch;external_dependency} -->
              </dependency>
            </dependencies>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
            <configuration>
              <argLine>
                -Xmx4096m
              </argLine>
              <systemPropertyVariables>
                <junit.jupiter.execution.parallel.enabled>true</junit.jupiter.execution.parallel.enabled>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>java9plus</id>
      <activation>
        <jdk>[9,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <!-- Skip maven compiler and use gmavenplus plugin instead -->
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-compiler-plugin;external_dependency} -->
            <configuration>
              <source>9</source>
              <target>9</target>
            </configuration>
            <executions>
              <execution>
                <id>test-compile</id>
                <phase>process-test-sources</phase>
                <goals>
                  <goal>testCompile</goal>
                </goals>
                <configuration>
                  <compilerId>groovy-eclipse-compiler</compilerId>
                  <compilerArgs>-warn:-unused</compilerArgs>
                  <release>8</release>
                </configuration>
              </execution>
              <execution>
                <id>default-testCompile</id>
                <phase>process-test-sources</phase>
                <goals>
                  <goal>testCompile</goal>
                </goals>
                <configuration>
                  <compilerId>groovy-eclipse-compiler</compilerId>
                  <compilerArgs>-warn:-unused</compilerArgs>
                  <release>8</release>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-eclipse-compiler</artifactId>
                <version>3.4.0-01</version> <!-- {x-version-update;org.codehaus.groovy:groovy-eclipse-compiler;external_dependency} -->
              </dependency>
              <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-eclipse-batch</artifactId>
                <version>2.5.8-01</version> <!-- {x-version-update;org.codehaus.groovy:groovy-eclipse-batch;external_dependency} -->
              </dependency>
            </dependencies>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
            <configuration>
              <argLine>
                -Xmx4096m
                --add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED
                --add-exports com.azure.core/com.azure.core.implementation.serializer.jackson=ALL-UNNAMED
                --add-exports com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED
                --add-opens com.azure.storage.common/com.azure.storage.common.implementation=ALL-UNNAMED
                --add-opens com.azure.storage.common/com.azure.storage.common.sas=ALL-UNNAMED
                --add-opens com.azure.storage.blob/com.azure.storage.blob=ALL-UNNAMED
                --add-opens com.azure.storage.blob/com.azure.storage.blob.implementation=ALL-UNNAMED
                --add-opens com.azure.storage.blob/com.azure.storage.blob.implementation.util=ALL-UNNAMED
                --add-opens com.azure.storage.blob/com.azure.storage.blob.specialized=ALL-UNNAMED
                --add-opens com.azure.storage.blob/com.azure.storage.blob.changefeed=ALL-UNNAMED
                --add-reads com.azure.core=ALL-UNNAMED
                --add-reads com.azure.core.test=ALL-UNNAMED
                --add-reads com.azure.core.amqp=ALL-UNNAMED
                --add-reads com.azure.storage.common=ALL-UNNAMED
                --add-reads com.azure.storage.internal.avro=ALL-UNNAMED
              </argLine>
              <systemPropertyVariables>
                <junit.jupiter.execution.parallel.enabled>true</junit.jupiter.execution.parallel.enabled>
              </systemPropertyVariables>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
