<!-- Copyright (c) Microsoft Corporation. All rights reserved.
     Licensed under the MIT License. -->
<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-sdk-parent</artifactId>
  <packaging>pom</packaging>
  <version>1.6.0</version> <!-- {x-version-update;com.azure:azure-sdk-parent;current} -->

  <name>Microsoft Azure SDK for Java Parent</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>

  <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>
    <legal>
      <![CDATA[[INFO] Any downloads listed may be third party software.  Microsoft grants you no rights for third party software.]]></legal>
    <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>
  </properties>

  <build>
    <pluginManagement>
      <plugins>
        <!-- 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>3.0.0</version> <!-- {x-version-update;org.codehaus.mojo:build-helper-maven-plugin;external_dependency} -->
          <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 lets you create jar with dependencies -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.2</version> <!-- {x-version-update;org.apache.maven.plugins:maven-assembly-plugin;external_dependency} -->
        </plugin>

        <!-- This plugin lets you generate project files for eclipse -->
         <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <version>2.8</version> <!-- {x-version-update;org.apache.maven.plugins:maven-eclipse-plugin;external_dependency} -->
        </plugin>

        <!-- This plugin lets you run the main method of a Java class in your project, with project dependencies automatically included in the classpath. -->
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>1.2.1</version> <!-- {x-version-update;org.codehaus.mojo:exec-maven-plugin;external_dependency} -->
       </plugin>

        <!-- This plugin is used to copy resources of your project. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.4.3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-resources-plugin;external_dependency} -->
        </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>
          <version>3.0.0-M3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-surefire-plugin;external_dependency} -->
          <configuration>
            <!-- Sets the VM argument line used when unit tests are run. -->
            <argLine>${surefireArgLine}</argLine>
            <includes>
              <include>**/Test*.java</include>
              <include>**/*Test.java</include>
              <include>**/*Tests.java</include>
              <include>**/*TestCase.java</include>
            </includes>
            <systemPropertyVariables>
              <configurationAPIRuntimeFound>runtimeConfiguration</configurationAPIRuntimeFound>
              <configurationAPIUseRuntimeFirst>runtimeConfiguration</configurationAPIUseRuntimeFirst>
            </systemPropertyVariables>
            <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>
              <configurationAPIEnvironmentFound>environmentConfiguration</configurationAPIEnvironmentFound>
              <configurationAPIUseRuntimeFirst>environmentConfiguration</configurationAPIUseRuntimeFirst>
            </environmentVariables>
            <useSystemClassLoader>false</useSystemClassLoader>
          </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>2.5.3</version> <!-- {x-version-update;org.apache.maven.plugins:maven-release-plugin;external_dependency} -->
        </plugin>

        <!-- This plugin used to remove files generated at build-time. -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-clean-plugin;external_dependency} -->
          <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>1.0.0</version> <!-- {x-version-update;org.eclipse.m2e:lifecycle-mapping;external_dependency} -->
          <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>2.22.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-failsafe-plugin;external_dependency} -->
          <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>9.3.22.v20171030</version> <!-- {x-version-update;org.eclipse.jetty:jetty-maven-plugin;external_dependency} -->
          <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>3.1.2</version> <!-- {x-version-update;org.apache.maven.plugins:maven-jar-plugin;external_dependency} -->
        </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>3.7.1</version> <!-- {x-version-update;org.apache.maven.plugins:maven-site-plugin;external_dependency} -->
          <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>3.0.0</version> <!-- {x-version-update;org.apache.maven.plugins:maven-project-info-reports-plugin;external_dependency} -->
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>
