<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2013 Stormpath, Inc.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the 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>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>com.stormpath.sdk</groupId>
    <artifactId>stormpath-sdk-root</artifactId>
    <version>0.9.3</version>
    <packaging>pom</packaging>

    <name>Stormpath Java SDK</name>
    <description>
        The Stormpath Java SDK enables JVM-based applications to easily interact with Stormpath's REST API.
    </description>
    <url>https://github.com/stormpath/stormpath-sdk-java</url>
    <inceptionYear>2012</inceptionYear>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@github.com:stormpath/stormpath-sdk-java.git</connection>
        <developerConnection>scm:git:git@github.com:stormpath/stormpath-sdk-java.git</developerConnection>
        <url>git@github.com:stormpath/stormpath-sdk-java.git</url>
      <tag>stormpath-sdk-root-0.9.3</tag>
  </scm>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/stormpath/stormpath-sdk-java/issues</url>
    </issueManagement>

    <developers>
        <developer>
            <id>lhazlewood</id>
            <name>Les Hazlewood</name>
            <email>les@stormpath.com</email>
            <url>http://www.leshazlewood.com</url>
            <timezone>-8</timezone>
            <organization>Stormpath, Inc.</organization>
            <organizationUrl>http://www.stormpath.com</organizationUrl>
        </developer>
        <developer>
            <id>jwysong</id>
            <name>Jeff Wysong</name>
            <email>jeff@stormpath.com</email>
            <timezone>-5</timezone>
            <organization>Stormpath, Inc.</organization>
            <organizationUrl>http://www.stormpath.com</organizationUrl>
        </developer>
        <developer>
            <id>ecrisostomo</id>
            <name>Elder Crisostomo</name>
            <email>elder@stormpath.com</email>
            <timezone>-8</timezone>
            <organization>Stormpath, Inc.</organization>
            <organizationUrl>http://www.stormpath.com</organizationUrl>
        </developer>
    </developers>

    <modules>
        <module>api</module>
        <module>impl</module>
        <module>extensions</module>
    </modules>

    <properties>

        <slf4j.version>1.6.6</slf4j.version>
        <httpClient.version>4.2.2</httpClient.version>
        <jackson.version>1.9.11</jackson.version>

        <!-- Test Dependencies: Only required for testing when building the SDK.  Not required by SDK users at runtime: -->
        <groovy.version>1.8.8</groovy.version>
        <logback.version>1.0.7</logback.version>
        <easymock.version>3.1</easymock.version>
        <testng.version>6.8</testng.version>

    </properties>

    <dependencies>

        <!-- Test Dependencies for _all_ children modules: -->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>${testng.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>${groovy.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <version>${easymock.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <dependencyManagement>

        <dependencies>

            <!-- 'Pool' of dependencies available to any sub-module, but not included automatically.
                 They must be explicitly referenced in the children POMs, but _don't_ include
                 version numbers in the child POMs.  Define them here only to guarantee version
                 compatibility across children modules! -->

            <!-- Stormpath Java SDK sub-module .jars (alphabetized by artifactId for easy scanning please!): -->
            <dependency>
                <groupId>com.stormpath.sdk</groupId>
                <artifactId>stormpath-sdk-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.stormpath.sdk</groupId>
                <artifactId>stormpath-sdk-impl</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- 3rd party dependencies: -->
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${httpClient.version}</version>
                <!-- The Stormpath Java SDK project uses SLF4J: -->
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
                <!-- Runtime only - replaces commons-logging runtime need for HTTPClient: -->
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jackson</groupId>
                <artifactId>jackson-mapper-asl</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

        </dependencies>

    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <!-- For unit tests: -->
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>1.5</version>
                <configuration>
                    <providerSelection>1.8</providerSelection>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.gmaven.runtime</groupId>
                        <artifactId>gmaven-runtime-1.8</artifactId>
                        <version>1.5</version>
                        <exclusions>
                            <exclusion>
                                <groupId>org.codehaus.groovy</groupId>
                                <artifactId>groovy-all</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>${groovy.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <goals>
                            <goal>generateStubs</goal>
                            <goal>compile</goal>
                            <goal>generateTestStubs</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.16</version>
                <configuration>
                    <includes>
                        <include>**/*IT.java</include>
                        <include>**/*IT.groovy</include>
                        <include>**/*ITCase.java</include>
                        <include>**/*ITCase.groovy</include>
                    </includes>
                    <excludes>
                        <exclude>**/*ManualIT.java</exclude>
                        <exclude>**/*ManualIT.groovy</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.4.2</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.scm</groupId>
                        <artifactId>maven-scm-provider-gitexe</artifactId>
                        <version>1.8.1</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <useReleaseProfile>false</useReleaseProfile>
                    <arguments>-Pdocs,stormpath-signature</arguments>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>stormpath-signature</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>docs</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-api-docs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <inherited>true</inherited>
                        <configuration>
                            <top><![CDATA[
    <script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-29159574-1']);
  _gaq.push(['_setDomainName', 'stormpath.com']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

<!-- kissmetrics -->
<script type="text/javascript">
  var _kmq = _kmq || [];
  var _kmk = _kmk || '684b854336bd3a6523260ebd991eec06b18b929a';
  function _kms(u){
    setTimeout(function(){
      var d = document, f = d.getElementsByTagName('script')[0],
      s = d.createElement('script');
      s.type = 'text/javascript'; s.async = true; s.src = u;
      f.parentNode.insertBefore(s, f);
    }, 1);
  }
  _kms('//i.kissmetrics.com/i.js');
  _kms('//doug1izaerwt3.cloudfront.net/' + _kmk + '.1.js');
</script>

<!-- Optimizely -->
<script src="//cdn.optimizely.com/js/225847041.js"></script>
                                ]]></top>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.1.2</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                        <inherited>true</inherited>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
