<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.azure</groupId>
  <artifactId>azure-client-sdk-parent</artifactId>
  <packaging>pom</packaging>
  <version>1.0.0</version>

  <name>Microsoft Azure SDK for Java</name>
  <description>Parent POM for Microsoft Azure SDK for Java</description>
  <url>https://github.com/Azure/azure-sdk-for-java</url>
  <organization>
    <name>Microsoft Corporation</name>
    <url>http://microsoft.com</url>
  </organization>

  <parent>
    <groupId>com.microsoft.maven</groupId>
    <artifactId>java-8-parent</artifactId>
    <version>8.0.0</version>
  </parent>

  <licenses>
    <license>
      <name>The MIT License (MIT)</name>
      <url>http://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>microsoft</id>
      <name>Microsoft Corporation</name>
    </developer>
  </developers>

  <!-- Repositories definitions -->
  <repositories>
    <repository>
      <id>ossrh</id>
      <name>Sonatype Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      <layout>default</layout>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>daily</updatePolicy>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>ossrh</id>
      <name>Sonatype Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      <layout>default</layout>
      <snapshots>
        <enabled>true</enabled>
        <updatePolicy>always</updatePolicy>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <name>Sonatype Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      <uniqueVersion>true</uniqueVersion>
      <layout>default</layout>
    </snapshotRepository>
    <site>
      <id>azure-java-build-docs</id>
      <url>${site.url}/site/</url>
    </site>
  </distributionManagement>

  <issueManagement>
    <system>GitHub</system>
    <url>${issues.url}</url>
  </issueManagement>

  <scm>
    <url>https://github.com/Azure/azure-sdk-for-java</url>
    <connection>scm:git:https://github.com/Azure/azure-sdk-for-java.git</connection>
    <developerConnection></developerConnection>
    <tag>HEAD</tag>
  </scm>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <packageOutputDirectory>${project.build.directory}</packageOutputDirectory>

    <legal>
      <![CDATA[[INFO] Any downloads listed may be third party software.  Microsoft grants you no rights for third party software.]]></legal>
    <testMode>playback</testMode>
    <playbackServerPort>11080</playbackServerPort>
    <alternativePlaybackServerPort>11081</alternativePlaybackServerPort>

    <site.url>https://azuresdkartifacts.blob.core.windows.net/azure-sdk-for-java</site.url>
    <issues.url>https://github.com/Azure/azure-sdk-for-java/issues</issues.url>

    <!-- Dependency Versions -->
    <jackson.version>2.9.6</jackson.version>
    <azure-client-runtime.version>1.6.4</azure-client-runtime.version>
    <client-runtime.version>1.6.1</client-runtime.version>
    <commons-codec.version>1.10</commons-codec.version>
    <spotbugs.version>3.1.11</spotbugs.version>
    <proton-j-version>0.31.0</proton-j-version>
    <qpid-proton-j-extensions-version>1.1.0</qpid-proton-j-extensions-version>
    <log4j-api.version>2.11.1</log4j-api.version>
    <azure-common.version>1.0.0-SNAPSHOT</azure-common.version>
    <azure-common-auth.version>1.0.0-SNAPSHOT</azure-common-auth.version>
    <reactor-netty.version>0.8.3.RELEASE</reactor-netty.version>
    <netty.version>4.1.33.Final</netty.version>

    <!-- Test Dependency Versions -->
    <adal4j.version>1.6.1</adal4j.version>
    <bcprov-jdk15on.version>1.59</bcprov-jdk15on.version>
    <azure-mgmt-keyvault.version>1.11.1</azure-mgmt-keyvault.version>
    <azure-mgmt-resources.version>1.3.0</azure-mgmt-resources.version>
    <azure-mgmt-resources-test.version>1.3.1-SNAPSHOT</azure-mgmt-resources-test.version>
    <azure-mgmt-graph-rbac.version>1.3.0</azure-mgmt-graph-rbac.version>
    <azure-mgmt-storage.version>1.3.0</azure-mgmt-storage.version>
    <azure-storage.version>8.0.0</azure-storage.version>
    <azure-client-authentication.version>1.6.3</azure-client-authentication.version>
    <reactor-test.version>3.2.3.RELEASE</reactor-test.version>
    <wiremock-standalone.version>2.15.0</wiremock-standalone.version>
    <jetty-http.version>9.4.8.v20171121</jetty-http.version>
    <jetty-server.version>9.4.8.v20171121</jetty-server.version>

    <!-- Maven Tool Versions -->
    <maven-build-tools.version>1.0.1-SNAPSHOT</maven-build-tools.version>
    <maven-javadoc.version>3.0.1</maven-javadoc.version>
    <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
    <maven-compiler-plugin.version>3.8.0</maven-compiler-plugin.version>
    <jetty-maven-plugin.version>9.3.22.v20171030</jetty-maven-plugin.version>
    <properties-maven-plugin.version>1.0.0</properties-maven-plugin.version>
    <maven-resources-plugin.version>2.4.3</maven-resources-plugin.version>
    <maven-clean-plugin.version>3.0.0</maven-clean-plugin.version>
    <lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
    <maven-failsafe-plugin.version>2.18.1</maven-failsafe-plugin.version>
    <maven-shade-plugin.version>2.4.1</maven-shade-plugin.version>
    <build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
    <maven-jar-plugin.version>3.0.2</maven-jar-plugin.version>
    <maven-build-tools.version>1.0.0</maven-build-tools.version>
    <xml-maven-plugin.version>1.0</xml-maven-plugin.version>
    <maven-site-plugin.version>3.7.1</maven-site-plugin.version>
    <maven-project-info-reports-plugin.version>3.0.0</maven-project-info-reports-plugin.version>
    <commons-io.version>2.4</commons-io.version>
    <checkstyle.version>8.18</checkstyle.version>
  </properties>

  <dependencyManagement>
    <dependencies>

      <!-- Other Microsoft Azure Dependencies -->
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-client-runtime</artifactId>
        <version>${azure-client-runtime.version}</version>
      </dependency>

      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>adal4j</artifactId>
        <version>${adal4j.version}</version>
      </dependency>

      <dependency>
        <groupId>com.azure</groupId>
        <artifactId>azure-common</artifactId>
        <version>${azure-common.version}</version>
      </dependency>

      <dependency>
        <groupId>com.azure</groupId>
        <artifactId>azure-common-auth</artifactId>
        <version>${azure-common-auth.version}</version>
      </dependency>

      <!-- Other Microsoft Dependencies -->
      <dependency>
        <groupId>com.microsoft.rest</groupId>
        <artifactId>client-runtime</artifactId>
        <version>${client-runtime.version}</version>
      </dependency>

      <!-- Jackson Dependencies -->
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${jackson.version}</version>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.version}</version>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson.datatype</groupId>
        <artifactId>jackson-datatype-jsr310</artifactId>
        <version>${jackson.version}</version>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson.dataformat</groupId>
        <artifactId>jackson-dataformat-xml</artifactId>
        <version>${jackson.version}</version>
      </dependency>

      <!-- Proton J and Extension Dependencies -->
      <dependency>
        <groupId>org.apache.qpid</groupId>
        <artifactId>proton-j</artifactId>
        <version>${proton-j-version}</version>
      </dependency>

      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>qpid-proton-j-extensions</artifactId>
        <version>${qpid-proton-j-extensions-version}</version>
      </dependency>

      <!-- Other Dependencies -->

      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>${commons-codec.version}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>${log4j-api.version}</version>
      </dependency>

      <dependency>
        <groupId>io.projectreactor.netty</groupId>
        <artifactId>reactor-netty</artifactId>
        <version>${reactor-netty.version}</version>
      </dependency>

      <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-buffer</artifactId>
        <version>${netty.version}</version>
      </dependency>

      <!-- Test dependencies -->
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-mgmt-storage</artifactId>
        <version>${azure-mgmt-storage.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-mgmt-graph-rbac</artifactId>
        <version>${azure-mgmt-graph-rbac.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-mgmt-resources</artifactId>
        <version>${azure-mgmt-resources-test.version}</version>
        <type>test-jar</type>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-client-authentication</artifactId>
        <version>${azure-client-authentication.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15on</artifactId>
        <version>${bcprov-jdk15on.version}</version>
      </dependency>

      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-mgmt-keyvault</artifactId>
        <version>${azure-mgmt-keyvault.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-mgmt-resources</artifactId>
        <version>${azure-mgmt-resources.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-storage</artifactId>
        <version>${azure-storage.version}</version>
      </dependency>

      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons-io.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
        <version>${slf4j.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>io.projectreactor</groupId>
        <artifactId>reactor-test</artifactId>
        <version>${reactor-test.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>com.github.tomakehurst</groupId>
        <artifactId>wiremock-standalone</artifactId>
        <version>${wiremock-standalone.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-http</artifactId>
        <version>${jetty-http.version}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-server</artifactId>
        <version>${jetty-server.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <!-- This plugin scans checkstyle issues in the code -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>com.azure</groupId>
            <artifactId>sdk-build-tools</artifactId>
            <version>${maven-build-tools.version}</version>
          </dependency>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>${checkstyle.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <configLocation>checkstyle/checkstyle.xml</configLocation>
          <suppressionsLocation>checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
          <headerLocation>checkstyle/java.header</headerLocation>
          <propertyExpansion>samedir=</propertyExpansion>
          <encoding>UTF-8</encoding>
          <consoleOutput>true</consoleOutput>
          <includeTestSourceDirectory>false</includeTestSourceDirectory>
          <linkXRef>true</linkXRef>

          <!-- TODO soon - enable these failure modes -->
          <failsOnError>false</failsOnError>
          <failOnViolation>false</failOnViolation>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- This plugin scans reports spotbugs in the code -->
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>${spotbugs.version}</version>
        <dependencies>
          <dependency>
            <groupId>com.azure</groupId>
            <artifactId>sdk-build-tools</artifactId>
            <version>${maven-build-tools.version}</version>
          </dependency>
        </dependencies>
        <configuration>
          <effort>Max</effort>
          <threshold>Low</threshold>
          <xmlOutput>true</xmlOutput>
          <spotbugsXmlOutputDirectory>${project.build.directory}/spotbugs</spotbugsXmlOutputDirectory>
          <excludeFilterFile>spotbugs/spotbugs-exclude.xml</excludeFilterFile>

          <!-- TODO soon - enable this failure mode -->
          <failOnError>false</failOnError>
        </configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- This plugin exports spotbugs reports in html form -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xml-maven-plugin</artifactId>
        <version>${xml-maven-plugin.version}</version>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>transform</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <transformationSets>
            <transformationSet>
              <dir>${project.build.directory}/spotbugs</dir>
              <includes>
                <include>spotbugsXml.xml</include>
              </includes>
              <outputDir>${project.build.directory}/spotbugs</outputDir>
              <stylesheet>fancy-hist.xsl</stylesheet>
              <fileMappers>
                <fileMapper implementation="org.codehaus.plexus.components.io.filemappers.FileExtensionMapper">
                  <targetExtension>.html</targetExtension>
                </fileMapper>
              </fileMappers>
            </transformationSet>
          </transformationSets>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs</artifactId>
            <version>${spotbugs.version}</version>
          </dependency>
        </dependencies>
      </plugin>

      <!-- Configure the jar plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <outputDirectory>${packageOutputDirectory}</outputDirectory>
        </configuration>
      </plugin>

      <!-- Configure the javadoc plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <jarOutputDirectory>${packageOutputDirectory}</jarOutputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Configure the source plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <outputDirectory>${packageOutputDirectory}</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Copy the pom file to output -->
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <id>copy</id>
            <phase>package</phase>
            <configuration>
              <target>
                <copy file="${pomFile}" tofile="${packageOutputDirectory}/${project.build.finalName}.pom"/>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <pluginManagement>

      <plugins>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <configuration>
            <source>8</source>
            <doctitle>Azure SDK for Java Reference Documentation</doctitle>
            <windowtitle>Azure SDK for Java Reference Documentation</windowtitle>
            <failOnError>false</failOnError>
            <footer>Visit the &lt;a href="https://docs.microsoft.com/java/azure/"&gt;Azure for Java Developers&lt;/a&gt;
              site for more Java documentation, including quick starts, tutorials, and code samples.
            </footer>
            <linksource>false</linksource>
            <excludePackageNames>com.microsoft.azure.template</excludePackageNames>
            <groups>
              <group>
                <title>Azure Batch</title>
                <packages>com.microsoft.azure.batch*</packages>
              </group>
              <group>
                <title>Azure Key Vault</title>
                <packages>com.microsoft.azure.keyvault*</packages>
              </group>
              <group>
                <title>Azure Event Hubs</title>
                <packages>com.microsoft.azure.eventhubs*:com.microsoft.azure.eventprocessorhost</packages>
              </group>
              <group>
                <title>Azure Common</title>
                <packages>com.microsoft.azure.common.azure-common*</packages>
              </group>
              <group>
                <title>Azure Common - Management</title>
                <packages>com.microsoft.azure.common.azure-common-mgmt*</packages>
              </group>
              <group>
                <title>Azure Common - Authentication</title>
                <packages>com.microsoft.azure.common.azure-common-auth*</packages>
              </group>
            </groups>
          </configuration>
        </plugin>

        <plugin>
          <groupId>com.github.spotbugs</groupId>
          <artifactId>spotbugs-maven-plugin</artifactId>
          <version>${spotbugs.version}</version>
          <dependencies>
            <dependency>
              <groupId>com.azure</groupId>
              <artifactId>sdk-build-tools</artifactId>
              <version>${maven-build-tools.version}</version>
            </dependency>
          </dependencies>
          <configuration>
            <effort>Max</effort>
            <threshold>Low</threshold>
            <xmlOutput>true</xmlOutput>
            <spotbugsXmlOutputDirectory>${project.build.directory}/spotbugs</spotbugsXmlOutputDirectory>
            <excludeFilterFile>spotbugs/spotbugs-exclude.xml</excludeFilterFile>

            <!-- TODO soon - enable this failure mode -->
            <failOnError>false</failOnError>
          </configuration>
        </plugin>

        <!-- This plugin adds sample code as tests for easier editing in IDEs -->
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${build-helper-maven-plugin.version}</version>
          <executions>
            <execution>
              <id>compile-samples-source</id>
              <phase>generate-test-sources</phase>
              <goals>
                <goal>add-test-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>src/samples/java</source>
                </sources>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <!-- This plugin is used to copy resources of your project. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven-resources-plugin.version}</version>
        </plugin>

        <!-- This plugin is used to run unit tests during the test phase of maven build lifecycle. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <includes>
              <include>**/Test*.java</include>
              <include>**/*Test.java</include>
              <include>**/*Tests.java</include>
              <include>**/*TestCase.java</include>
            </includes>
            <environmentVariables>
              <test.mode>${testMode}</test.mode>
              <KEYVAULT_VAULTURI>https://azure-keyvault-3.vault.azure.net</KEYVAULT_VAULTURI>
              <KEYVAULT_VAULTURI_ALT>https://azure-keyvault-2.vault.azure.net</KEYVAULT_VAULTURI_ALT>
            </environmentVariables>
          </configuration>
        </plugin>

        <!-- This plugin is used to prepare and perform a release for the project with Maven.
              It has no influence on Maven build itself. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${maven-release-plugin.version}</version>
        </plugin>

        <!-- This plugin used to remove files generated at build-time. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${maven-clean-plugin.version}</version>
          <configuration>
            <excludeDefaultDirectories>true</excludeDefaultDirectories>
            <filesets>
              <fileset>
                <directory>target</directory>
                <followSymlinks>false</followSymlinks>
                <includes>
                  <include>**</include>
                </includes>
                <excludes>
                  <exclude>test-classes/session-records/</exclude>
                </excludes>
              </fileset>
            </filesets>
          </configuration>
        </plugin>

        <!--This plugin's configuration is used to store Eclipse m2e settings only.
            It has no influence on the Maven build itself.-->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>${lifecycle-mapping.version}</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>com.googlecode.addjars-maven-plugin</groupId>
                    <artifactId>addjars-maven-plugin</artifactId>
                    <versionRange>[1.0.5,)</versionRange>
                    <goals>
                      <goal>add-jars</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore/>
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>

        <!-- This plugin is used to run integration tests. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven-failsafe-plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>

        <!-- This plugin is used for rapid playback testing. -->
        <plugin>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>${jetty-maven-plugin.version}</version>
          <configuration>
            <scanIntervalSeconds>0</scanIntervalSeconds>
            <stopPort>11079</stopPort>
            <stopKey>STOP</stopKey>
            <waitForChild>false</waitForChild>
            <jettyXml>./jetty.xml</jettyXml>
          </configuration>
        </plugin>

        <!-- This plugin provides the capability to build jars. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
        </plugin>

        <!-- This plugin is used to generate project's site and reports -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${maven-site-plugin.version}</version>
          <configuration>
            <relativizeDecorationLinks>false</relativizeDecorationLinks>
          </configuration>
        </plugin>

        <!-- This plugin is used to generate reports information about the project. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-project-info-reports-plugin</artifactId>
          <version>${maven-project-info-reports-plugin.version}</version>
        </plugin>

      </plugins>

    </pluginManagement>

  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>3.0.0</version>
        <reportSets>
          <reportSet>
            <id>aggregate</id>
            <inherited>false</inherited>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>3.0.0</version>
        <configuration>
          <configLocation>checkstyle/checkstyle.xml</configLocation>
          <suppressionsLocation>checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
          <headerLocation>checkstyle/java.header</headerLocation>
          <propertyExpansion>samedir=</propertyExpansion>
          <encoding>UTF-8</encoding>
          <consoleOutput>true</consoleOutput>
          <includeTestSourceDirectory>false</includeTestSourceDirectory>
          <linkXRef>true</linkXRef>

          <!-- TODO soon - enable these failure modes -->
          <failsOnError>false</failsOnError>
          <failOnViolation>false</failOnViolation>
        </configuration>
        <reportSets>
          <reportSet>
            <id>non-aggregate</id>
            <reports>
              <report>checkstyle</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>aggregate</id>
            <inherited>false</inherited>
            <reports>
              <report>checkstyle-aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
        <version>${spotbugs.version}</version>
        <reportSets>
          <reportSet>
            <id>non-aggregate</id>
            <reports>
              <report>spotbugs</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>aggregate</id>
            <inherited>false</inherited>
            <reports>
              <report>spotbugs</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>${maven-javadoc.version}</version>
        <reportSets>
          <reportSet>
            <id>non-aggregate</id>
            <reports>
              <report>javadoc</report>
            </reports>
          </reportSet>
          <reportSet>
            <id>aggregate</id>
            <inherited>false</inherited>
            <reports>
              <report>aggregate</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>3.0.0</version>
        <reportSets>
          <reportSet>
            <reports>
              <report>index</report>
              <report>summary</report>
              <report>dependency-info</report>
              <report>dependency-management</report>
              <report>dependency-convergence</report>
              <report>ci-management</report>
              <report>dependencies</report>
              <report>issue-management</report>
              <report>licenses</report>
              <report>scm</report>
              <report>plugins</report>
              <report>plugin-management</report>
              <report>team</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>

  <profiles>

    <!--
     By default we build against our baseline, Java 8, but we also want to ensure compatibility
     against the latest Java LTS release, currently Java 11. We therefore have two profiles:
       * The default 'java8', which will perform a build using Java 8 as its target.
       * The non-default 'java-lts' profile, which will build against the current LTS release.
   -->
    <profile>
      <id>java8</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <property>
          <name>!java-lts</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven-compiler-plugin.version}</version>
            <configuration>
              <source>1.8</source>
              <target>1.8</target>
              <showWarnings>true</showWarnings>
              <showDeprecation>true</showDeprecation>
              <compilerArgument>-Xlint:all</compilerArgument>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>java-lts</id>
      <activation>
        <property>
          <name>java-lts</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven-compiler-plugin.version}</version>
            <configuration>
              <source>11</source>
              <target>11</target>
              <showWarnings>true</showWarnings>
              <showDeprecation>true</showDeprecation>
              <compilerArgument>-Xlint:all</compilerArgument>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Customise the javadoc plugin to not include module directories in links. We don't
         currently use modules, so search results were being directed to an 'undefined'
         directory (for an 'undefined' module). This no-module-directories flag fixes
         this, but it is only required for JDK 9+ -->
    <profile>
      <id>javadoc-no-modules-fix</id>
      <activation>
        <jdk>[9,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <additionalJOption>--no-module-directories</additionalJOption>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>non-shipping-modules</id>
      <activation>
        <property>
          <name>include-non-shipping-modules</name>
        </property>
      </activation>
      <modules>
        <module>./eng/spotbugs-aggregate-report</module>
        <module>./eng/code-quality-reports</module>
      </modules>
    </profile>

    <profile>
      <id>template-module</id>
      <activation>
        <property>
          <name>include-template</name>
        </property>
      </activation>
      <modules>
        <module>./sdk/template/azure-sdk-template</module>
      </modules>
    </profile>
  </profiles>

  <modules>
    <module>./batch/data-plane</module>
    <module>./common</module>
    <module>./eventhubs/data-plane</module>
    <module>./keyvault/data-plane</module>
  </modules>
</project>
