<!--
 Copyright (c) Microsoft Corporation. All rights reserved.
 Licensed under the MIT License. See License.txt in the project root for
 license information.
-->
<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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.microsoft.azure</groupId>
  <version>1.2.0</version>
  <artifactId>azure-keyvault-parent</artifactId>
  <packaging>pom</packaging>

  <name>Microsoft Azure Key Vault SDK Parent</name>
  <description>This package contains the parent module of Microsoft Azure Key Vault SDK.</description>
  <url>https://github.com/Azure/azure-keyvault-java</url>

  <licenses>
    <license>
      <name>The MIT License (MIT)</name>
      <url>http://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <url>scm:git:https://github.com/Azure/azure-keyvault-java</url>
    <connection>scm:git:git@github.com:Azure/azure-keyvault-java.git</connection>
    <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>
    
    <!-- Version properties -->
    <jackson.version>2.9.6</jackson.version>
    
    <!-- Testing properties -->
    <testMode>playback</testMode>
    <playbackServerPort>11080</playbackServerPort>
    <alternativePlaybackServerPort>11081</alternativePlaybackServerPort>
  </properties>

  <developers>
    <developer>
      <id>microsoft</id>
      <name>Microsoft</name>
    </developer>
  </developers>

  <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>always</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>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>
      <!-- Azure KeyVault SDK Dependencies -->
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-keyvault-webkey</artifactId>
        <version>1.2.0</version>
      </dependency>
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-keyvault-cryptography</artifactId>
        <version>1.2.0</version>
      </dependency>
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-keyvault-core</artifactId>
        <version>1.2.0</version>
      </dependency>
      <dependency>
      <groupId>com.microsoft.azure</groupId>
      <artifactId>azure-keyvault</artifactId>
      <version>1.2.0</version>
    </dependency>
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-keyvault-extensions</artifactId>
        <version>1.2.0</version>
      </dependency>
      
      <!-- Other Microsoft Azure Dependencies -->
      <!-- https://mvnrepository.com/artifact/com.microsoft.azure/azure-mgmt-keyvault -->
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-mgmt-keyvault</artifactId>
        <version>1.11.1</version>
      </dependency>
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-client-runtime</artifactId>
        <version>1.3.0</version>
      </dependency>
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-mgmt-resources</artifactId>
        <version>1.3.0</version>
      </dependency>
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure</artifactId>
        <version>1.3.0</version>
      </dependency>

     <!-- Other Microsoft Dependencies -->
      <dependency>
        <groupId>com.microsoft.rest</groupId>
        <artifactId>client-runtime</artifactId>
        <version>1.6.1</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-databind</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${jackson.version}</version>
      </dependency>
      
      <!-- Other Dependencies -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
  		<version>3.4</version>
  	  </dependency>
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>1.10</version>
      </dependency>
      <dependency>
        <groupId>io.reactivex</groupId>
        <artifactId>rxjava</artifactId>
        <version>1.2.4</version>
      </dependency>
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>20.0</version>
      </dependency>
      
      <!-- Test dependencies -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>adal4j</artifactId>
        <version>1.4.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15on</artifactId>
        <version>1.59</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.17</version>
        <dependencies>
          <dependency>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>autorest-build-tools</artifactId>
            <version>1.0.0-beta6-SNAPSHOT</version>
          </dependency>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>6.18</version>
          </dependency>
        </dependencies>
        <configuration>
          <configLocation>checkstyle.xml</configLocation>
          <propertyExpansion>samedir=runtimes/build-tools/src/main/resources</propertyExpansion>
          <suppressionsLocation>suppressions.xml</suppressionsLocation>
          <consoleOutput>true</consoleOutput>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
          <showWarnings>true</showWarnings>
          <showDeprecation>true</showDeprecation>
          <compilerArgument>-Xlint:unchecked</compilerArgument>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <excludePackageNames>*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.storage</excludePackageNames>
          <bottom><![CDATA[<code>/**
<br />* Copyright (c) Microsoft Corporation. All rights reserved.
<br />* Licensed under the MIT License. See License.txt in the project root for
<br />* license information.
<br />*/</code>]]></bottom>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.3</version>
      </plugin>

      <plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>9.2.22.v20170606</version>
        <configuration>
          <jettyXml>jetty.xml</jettyXml>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>

      <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>properties-maven-plugin</artifactId>
    <version>1.0.0</version>
    <executions>
        <execution>
            <goals>
                <goal>set-system-properties</goal>
            </goals>
            <configuration>
                <properties>
                    <property>
<name>keyvault.vaulturi</name>
       		<value>https://tifchen-keyvault-fancy.vault.azure.net</value>
                    </property>

                    <property>
                           		<name>keyvault.vaulturi.alt</name>
       		<value>https://tifchen-keyvault-fancier.vault.azure.net</value>
                    </property>
                </properties>
            </configuration>
        </execution>
    </executions>
</plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.4.3</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.18.1</version>
          <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://tifchen-keyvault-fancy.vault.azure.net</keyvault.vaulturi>
              <keyvault.vaulturi.alt>https://tifchen-keyvault-fancier.vault.azure.net</keyvault.vaulturi.alt>
            </environmentVariables>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
  			<plugin>
	  			<groupId>org.apache.maven.plugins</groupId>
	  			<artifactId>maven-clean-plugin</artifactId>
	  			<version>3.0.0</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>1.0.0</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>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>2.18.1</version>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <profiles>
    <profile>
      <id>run-shade-plugin</id>
      <activation>
        <property><name>runShadePlugin</name></property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>2.4.1</version>
            <configuration>
            </configuration>
            <executions>
              <execution>
                <id>shade-plugin</id>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <filters>
                    <filter>
                      <artifact>*:*</artifact>
                      <excludes>
                        <exclude>META-INF/*.SF</exclude>
                        <exclude>META-INF/*.DSA</exclude>
                        <exclude>META-INF/*.RSA</exclude>
                      </excludes>
                    </filter>
                  </filters>
                  <transformers>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
                  </transformers>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
  <modules>
    <module>./azure-keyvault</module>
    <module>./azure-keyvault-core</module>
    <module>./azure-keyvault-webkey</module>
    <module>./azure-keyvault-cryptography</module>
    <module>./azure-keyvault-extensions</module>
    <module>./azure-keyvault-complete</module>
  </modules>
</project>
