<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>
    <parent>
        <groupId>org.jenkins-ci.plugins</groupId>
        <artifactId>plugin</artifactId>
        <version>2.6</version>
    </parent>

    <artifactId>azure-vm-agents</artifactId>
    <version>0.7.2</version>
    <packaging>hpi</packaging>
    <name>Azure VM Agents</name>
    <description>Provisions agents on Azure cloud</description>
    <url>https://wiki.jenkins-ci.org/display/JENKINS/Azure+VM+Agents+Plugin</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <azuresdk.version>1.3.0</azuresdk.version>
        <azure-storage.version>4.4.0</azure-storage.version>
        <jackson.version>2.7.2</jackson.version>
        <jenkins.version>1.653</jenkins.version>
        <java.level>7</java.level>
        <findbugs.failOnError>true</findbugs.failOnError>
        <findbugs.excludeFilterFile>findbugs-exclude.xml</findbugs.excludeFilterFile>
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <azure-credentials.version>1.4.0</azure-credentials.version>
        <azure-commons.version>0.2.4</azure-commons.version>
        <guava.version>19.0</guava.version>
    </properties>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>azure_devops</id>
            <name>Azure DevOps Team</name>
            <email>vscjenkins@microsoft.com</email>
        </developer>
    </developers>

    <dependencies>

        <dependency>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-storage</artifactId>
            <version>${azure-storage.version}</version>
        </dependency>
        <dependency>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure</artifactId>
            <version>${azuresdk.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>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>azure-credentials</artifactId>
            <version>${azure-credentials.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>azure-commons</artifactId>
            <version>${azure-commons.version}</version>
        </dependency>

        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>azure-commons-core</artifactId>
            <version>${azure-commons.version}</version>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>

        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch</artifactId>
            <version>0.1.54</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5</version>
        </dependency>

        <dependency>
            <groupId>org.jenkins-ci.main</groupId>
            <artifactId>jenkins-test-harness</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.main</groupId>
            <artifactId>jenkins-core</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>3.3.9</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.3.9</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.19.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>2.4.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>credentials</artifactId>
            <version>2.1.5</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>plain-credentials</artifactId>
            <version>1.4</version>
        </dependency>
        <dependency>
            <groupId>org.jenkins-ci.plugins</groupId>
            <artifactId>cloud-stats</artifactId>
            <version>0.11</version>
        </dependency>
    </dependencies>

    <scm>
        <connection>scm:git:ssh://git@github.com/jenkinsci/azure-vm-agents-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/jenkinsci/azure-vm-agents-plugin.git</developerConnection>
        <url>https://github.com/jenkinsci/azure-vm-agents-plugin</url>
        <tag>azure-vm-agents-0.7.2</tag>
    </scm>

    <repositories>
        <repository>
            <id>repo.jenkins-ci.org</id>
            <url>http://repo.jenkins-ci.org/public/</url>
        </repository>
        <repository>
            <id>com.springsource.repository.bundles.release</id>
            <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
            <url>http://repository.springsource.com/maven/bundles/release</url>
        </repository>
        <repository>
            <id>com.springsource.repository.bundles.external</id>
            <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
            <url>http://repository.springsource.com/maven/bundles/external</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>repo.jenkins-ci.org</id>
            <url>http://repo.jenkins-ci.org/public/</url>
        </pluginRepository>
    </pluginRepositories>

    <build>
        <resources>
            <resource>
                <directory>${project.basedir}</directory>
                <includes>
                    <include>ThirdPartyNotices.txt</include>
                    <include>LICENSE</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.jenkins-ci.tools</groupId>
                <artifactId>maven-hpi-plugin</artifactId>
                <configuration>
                    <maskClasses>
                        com.microsoft.jenkins.azurecommons.core.
                        com.fasterxml.jackson.
                        com.google.common.

                        com.microsoft.azure.AzureAsyncOperation
                        com.microsoft.azure.AzureClient
                        com.microsoft.azure.AzureEnvironment
                        com.microsoft.azure.AzureResponseBuilder
                        com.microsoft.azure.AzureServiceClient
                        com.microsoft.azure.AzureServiceFuture
                        com.microsoft.azure.CloudError
                        com.microsoft.azure.CloudException
                        com.microsoft.azure.ListOperationCallback
                        com.microsoft.azure.Page
                        com.microsoft.azure.PagedList
                        com.microsoft.azure.PollingState
                        com.microsoft.azure.Resource
                        com.microsoft.azure.SubResource
                        com.microsoft.aad.
                        com.microsoft.applicationinsights.
                        com.microsoft.azure.credentials.
                        com.microsoft.azure.keyvault.
                        com.microsoft.azure.management.
                        com.microsoft.azure.serializer.
                        com.microsoft.azure.storage.
                        com.microsoft.rest.
                    </maskClasses>
                </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-surefire-plugin</artifactId>
                <version>2.20.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <forkCount>7</forkCount>
                    <reuseForks>true</reuseForks>
                    <threadCountMethods>7</threadCountMethods>
                    <parallel>methods</parallel>
                </configuration>
            </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>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <configLocation>checkstyle.xml</configLocation>
                    <encoding>UTF-8</encoding>
                    <consoleOutput>true</consoleOutput>
                    <resourceIncludes>src/main/resources/**</resourceIncludes>
                    <!--
                    Exclude the generated sources.

                    We cannot use pattern like **/generated-sources/**/* here as the generated source directory
                    belongs to the base directory, which the excludes pattern doesn't apply to.

                    TODO: Fix style for AzureVMManagementServiceDelegate and AzureVMAgentSSHLauncher
                    -->
                    <excludes>
                        com/microsoft/azure/vmagent/Messages.java,
                        com/microsoft/azure/vmagent/AzureVMManagementServiceDelegate.java,
                        com/microsoft/azure/vmagent/remote/AzureVMAgentSSHLauncher.java
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
