<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>

    <parent>
        <groupId>com.microsoft.azure</groupId>
        <artifactId>azure-spring-boot-starter-bom</artifactId>
        <version>0.1.7</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>azure-spring-boot-starter-parent</artifactId>
    <packaging>pom</packaging>

    <name>Azure Spring Boot Starter Parent</name>
    <description>Parent package for Azure Spring Boot Starters</description>
    <url>https://github.com/Microsoft/azure-spring-boot-starters</url>

    <scm>
        <connection>scm:git:git://github.com/Microsoft/azure-spring-boot-starters.git</connection>
        <developerConnection>scm:git:ssh://github.com:Microsoft/azure-spring-boot-starters.git</developerConnection>
        <url>https://github.com/Microsoft/azure-spring-boot-starters/tree/master</url>
    </scm>

    <licenses>
        <license>
            <name>MIT</name>
            <url>https://github.com/Microsoft/azure-spring-boot-starters/blob/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>ZhijunZhao</id>
            <name>Zhijun Zhao</name>
            <email>zhijzhao@microsoft.com</email>
        </developer>

        <developer>
            <id>yungez</id>
            <name>Yunge Zhu</name>
            <email>yungez@microsoft.com</email>
        </developer>
    </developers>

    <properties>
        <!-- For module that has different relative path to the root dir, project.rootdir should be redefined in its
        module pom file -->
        <project.rootdir>${project.basedir}/../..</project.rootdir>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <profiles>
        <profile>
            <id>doclint-java8-disable</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>
            <properties>
                <javadoc.opts>-Xdoclint:none</javadoc.opts>
            </properties>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <!-- Import dependency management from Spring Boot -->
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>1.5.4.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <configuration>
                    <show>private</show>
                    <failOnError>false</failOnError>
                    <sourceFileExcludes>
                        <exclude>
                            com/microsoft/azure/spring/data/documentdb/core/mapping/BasicDocumentDbPersistentProperty.java
                        </exclude>
                    </sourceFileExcludes>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <additionalparam>${javadoc.opts}</additionalparam>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>2.17</version>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <configLocation>${project.rootdir}/common/config/checkstyle.xml</configLocation>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <failOnViolation>true</failOnViolation>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <linkXRef>false</linkXRef>
                </configuration>
                <inherited>true</inherited>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <xmlOutput>true</xmlOutput>
                    <findbugsXmlOutputDirectory>${project.build.directory}/findbugs
                    </findbugsXmlOutputDirectory>
                    <excludeFilterFile>${project.rootdir}/common/config/findbugs-exclude.xml</excludeFilterFile>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.ant</groupId>
                        <artifactId>ant</artifactId>
                        <version>1.9.4</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                    <check>
                        <haltOnFailure>true</haltOnFailure>
                        <branchRate>60</branchRate>
                        <totalBranchRate>60</totalBranchRate>
                    </check>
                    <instrumentation>
                        <excludes>
                            <exclude>com/microsoft/azure/spring/common/GetHashMac.class</exclude>
                            <exclude>com/microsoft/azure/**/Constants.class</exclude>
                            <exclude>com/microsoft/azure/**/AzureADJwtTokenFilter.class</exclude>
                            <exclude>com/microsoft/azure/**/AzureADGraphClient.class</exclude>
                            <exclude>com/microsoft/azure/**/Userprincipal.class</exclude>
                        </excludes>
                    </instrumentation>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <modules>
        <module>../azure-spring-common</module>
        <module>../../activedirectory/azure-ad-integration-spring-boot-starter</module>
        <module>../../documentdb/spring-data-azure-documentdb</module>
        <module>../../documentdb/azure-documentdb-spring-boot-autoconfigure</module>
        <module>../../documentdb/azure-documentdb-spring-boot-starter</module>
        <module>../../storage/azure-storage-spring-boot-starter</module>
        <module>../../servicebus/azure-servicebus-spring-boot-starter</module>
        <module>../../mediaservices/azure-mediaservices-spring-boot-starter</module>
        <module>../../microsoft-graph/spring-social-microsoft-graph</module>
        <module>../../microsoft-graph/microsoft-graph-spring-boot-autoconfigure</module>
        <module>../../microsoft-graph/microsoft-graph-spring-social-starter</module>
        <module>../../keyvault/azure-keyvault-secrets-spring-boot-starter</module>
        <module>../../cloudfoundry/azure-cloud-foundry-service</module>
    </modules>
</project>
