<!--
  The MIT License (MIT)

  Copyright (c) 2015 Microsoft

  Permission is hereby granted, free of charge, to any person obtaining a copy
  of this software and associated documentation files (the "Software"), to deal
  in the Software without restriction, including without limitation the rights
  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  copies of the Software, and to permit persons to whom the Software is
  furnished to do so, subject to the following conditions:

  The above copyright notice and this permission notice shall be included in all
  copies or substantial portions of the Software.

  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  SOFTWARE.
--><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>

    <name>hazelcast-azure</name>
    <description>An Azure DiscoveryStrategy for Hazelcast</description>
    <groupId>com.hazelcast</groupId>
    <artifactId>hazelcast-azure</artifactId>
    <version>2.0.0-atlassian-10</version>
    <url>http://www.hazelcast.com/</url>
    <packaging>jar</packaging>

    <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>

    <scm>
        <connection>scm:git:git://github.com/atlassian/hazelcast-azure.git</connection>
        <developerConnection>scm:git:git@github.com:atlassian/hazelcast-azure.git</developerConnection>
        <url>https://github.com/hazelcast/hazelcast/</url>
      <tag>hazelcast-azure-2.0.0-atlassian-10</tag>
  </scm>

    <developers>
        <developer>
            <id>sedouard</id>
            <name>Steven Edouard</name>
            <email>sedouard@microsoft.com</email>
            <url>http://www.stevenedouard.com</url>
            <organization>Microsoft</organization>
            <organizationUrl>http://www.microsoft.com</organizationUrl>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
            <timezone>America/Los_Angeles</timezone>
            <properties>
                <picUrl>https://avatars.githubusercontent.com/u/3053263?v=3</picUrl>
            </properties>
        </developer>
    </developers>

    <distributionManagement>
        <repository>
            <id>atlassian-3rdparty</id>
            <url>https://packages.atlassian.com/maven/3rdparty</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>snapshot-repository</id>
            <name>Maven2 Snapshot Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </repository>
    </repositories>

    <properties>
        <!-- needed for checkstyle/findbugs -->
        <main.basedir>${project.basedir}</main.basedir>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- we want to remain java 1.6 compatible -->
        <java.version>1.6</java.version>

        <hazelcast.version>3.7.2</hazelcast.version>

        <azure.client.authentication.version>1.7.14</azure.client.authentication.version>
        <azure.mgmt.sdk.version>1.14.0</azure.mgmt.sdk.version>

        <maven.findbugs.plugin.version>3.0.0</maven.findbugs.plugin.version>
        <maven.checkstyle.plugin.version>2.12</maven.checkstyle.plugin.version>
        <maven.sonar.plugin.version>3.3.0.603</maven.sonar.plugin.version>
        <maven.jacoco.plugin.version>0.7.9</maven.jacoco.plugin.version>
        <maven.animal.sniffer.plugin.version>1.14</maven.animal.sniffer.plugin.version>
        <maven.source.plugin.version>2.2.1</maven.source.plugin.version>
        <maven.surefire.plugin.version>2.18.1</maven.surefire.plugin.version>
        <maven.rar.plugin.version>2.2</maven.rar.plugin.version>
        <maven.gpg.plugin.version>1.4</maven.gpg.plugin.version>
        <maven.javadoc.plugin.version>2.9</maven.javadoc.plugin.version>
        <nimbus.version>9.4</nimbus.version>

        <junit.version>4.12</junit.version>
        <mockito.version>1.10.19</mockito.version>

        <h2.version>1.3.160</h2.version>
        <atomikos.version>3.9.3</atomikos.version>
        <log4j.version>1.2.12</log4j.version>
        <bytebuddy.version>1.6.12</bytebuddy.version>
        <okhttp.version>4.12.0</okhttp.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefire.plugin.version}</version>
                <configuration combine.self="override">
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <runOrder>failedfirst</runOrder>
                    <argLine>
                        -Xms128m -Xmx1G -XX:MaxPermSize=128M
                        -Dhazelcast.phone.home.enabled=false
                        -Dhazelcast.mancenter.enabled=false
                        -Dhazelcast.logging.type=none
                        -Dhazelcast.test.use.network=false
                    </argLine>
                    <groups>com.hazelcast.test.annotation.QuickTest</groups>
                    <excludedGroups>com.hazelcast.test.annotation.SlowTest</excludedGroups>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.fizzed</groupId>
                <artifactId>fizzed-watcher-maven-plugin</artifactId>
                <version>1.0.4</version>
                <configuration>
                    <files>
                        <param>src/main/java</param>
                        <param>src/main/resources</param>
                        <param>src/test/java</param>
                    </files>
                    <goals>
                        <param>clean</param>
                        <param>compile</param>
                    </goals>
                    <profiles>
                        <param>optional-profile-to-activate-while-running-goals</param>
                    </profiles>
                </configuration>
            </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-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
                <version>${maven.sonar.plugin.version}</version>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>copy-license</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}/META-INF</outputDirectory>
                            <overwrite>true</overwrite>
                            <resources>
                                <resource>
                                    <directory>${user.dir}</directory>
                                    <includes>
                                        <include>LICENSE.txt</include>
                                        <include>NOTICE.txt</include>
                                        <include>license.txt</include>
                                        <include>notice.txt</include>
                                    </includes>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast</artifactId>
            <version>${hazelcast.version}</version>
        </dependency>
        <dependency>
            <groupId>com.hazelcast</groupId>
            <artifactId>hazelcast</artifactId>
            <scope>test</scope>
            <version>${hazelcast.version}</version>
            <classifier>tests</classifier>
        </dependency>
        <dependency>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-client-authentication</artifactId>
            <version>${azure.client.authentication.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.squareup.okhttp3</groupId>
                    <artifactId>okhttp</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.microsoft.azure</groupId>
            <artifactId>azure-mgmt-compute</artifactId>
            <version>${azure.mgmt.sdk.version}</version>
        </dependency>
        <dependency>
            <groupId>com.nimbusds</groupId>
            <artifactId>oauth2-oidc-sdk</artifactId>
            <version>${nimbus.version}</version>
        </dependency>
        <!-- This dependency is here to patch a vulnerability in the version of okhttp used by
        azure-client-authentication. More information can be found here: https://github.com/square/okhttp/issues/6738
        -->
        <dependency>
            <groupId>com.squareup.okhttp3</groupId>
            <artifactId>okhttp</artifactId>
            <version>${okhttp.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
            <scope>test</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <version>1.6.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
            <version>1.6.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>${bytebuddy.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-agent</artifactId>
            <version>${bytebuddy.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>checkstyle</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-checkstyle-plugin</artifactId>
                        <version>${maven.checkstyle.plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>validate</phase>
                                <goals>
                                    <goal>checkstyle</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <configLocation>${main.basedir}/checkstyle/checkstyle.xml</configLocation>
                            <suppressionsLocation>${main.basedir}/checkstyle/suppressions.xml</suppressionsLocation>
                            <headerLocation>${main.basedir}/checkstyle/ClassHeader.txt</headerLocation>
                            <enableRSS>false</enableRSS>
                            <linkXRef>true</linkXRef>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <failOnViolation>true</failOnViolation>
                            <includeTestSourceDirectory>false</includeTestSourceDirectory>
                            <enableRulesSummary>true</enableRulesSummary>
                            <propertyExpansion>main.basedir=${main.basedir}</propertyExpansion>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>findbugs</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>findbugs-maven-plugin</artifactId>
                        <version>${maven.findbugs.plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>compile</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <failOnError>true</failOnError>
                            <excludeFilterFile>${main.basedir}/findbugs/findbugs-exclude.xml</excludeFilterFile>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>test-coverage</id>
            <properties>
                <argLine>
                    -Xms128m -Xmx1G -XX:MaxPermSize=128M
                    -Dhazelcast.version.check.enabled=false
                    -Dhazelcast.mancenter.enabled=false
                    -Dhazelcast.logging.type=none
                    -Dhazelcast.test.use.network=false
                </argLine>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${maven.jacoco.plugin.version}</version>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${maven.surefire.plugin.version}</version>
                        <configuration combine.self="override">
                            <redirectTestOutputToFile>true</redirectTestOutputToFile>
                            <testFailureIgnore>true</testFailureIgnore>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>sonar-maven-plugin</artifactId>
                        <version>${maven.sonar.plugin.version}</version>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <properties>
                <javadoc>true</javadoc>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven.gpg.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven.javadoc.plugin.version}</version>
                        <configuration>
                            <javaApiLinks>
                                <property>
                                    <name>api_1.6</name>
                                    <value>http://download.oracle.com/javase/1.6.0/docs/api/</value>
                                </property>
                                <property>
                                    <name>api_1.7</name>
                                    <value>http://download.oracle.com/javase/1.7.0/docs/api/</value>
                                </property>
                            </javaApiLinks>
                            <maxmemory>1024</maxmemory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>master</id>
            <properties>
                <hazelcast.version>3.10-SNAPSHOT</hazelcast.version>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>com.hazelcast</groupId>
                    <artifactId>hazelcast</artifactId>
                    <version>${hazelcast.version}</version>
                </dependency>
                <dependency>
                    <groupId>com.hazelcast</groupId>
                    <artifactId>hazelcast</artifactId>
                    <scope>test</scope>
                    <version>${hazelcast.version}</version>
                    <classifier>tests</classifier>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${maven.surefire.plugin.version}</version>
                        <configuration combine.self="override">
                            <parallel>none</parallel>
                            <redirectTestOutputToFile>true</redirectTestOutputToFile>
                            <argLine>-Xms128m -Xmx1G -XX:MaxPermSize=128M
                                -Dhazelcast.phone.home.enabled=false
                                -Dhazelcast.mancenter.enabled=false
                                -Dhazelcast.logging.type=none
                                -Dhazelcast.test.use.network=true
                            </argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
