<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2017 Okta
  ~
  ~ 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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.okta</groupId>
        <artifactId>okta-parent</artifactId>
        <version>1</version>
        <relativePath>../okta-java-parent</relativePath>
    </parent>

    <groupId>com.okta.sdk</groupId>
    <artifactId>okta-sdk-root</artifactId>
    <version>0.7.0</version>
    <packaging>pom</packaging>

    <name>Okta Java SDK</name>
    <description>Okta SDK for Java</description>
    <url>https://github.com/okta/oktasdk-java</url>
    <inceptionYear>2017</inceptionYear>

    <properties>
        <swagger-annotations.version>1.5.8</swagger-annotations.version>
        <jersey.version>2.22.2</jersey.version>
        <jackson.version>2.8.8</jackson.version>
        <jodatime.version>2.7</jodatime.version>
        <snakeyaml.version>1.17</snakeyaml.version>
        <jjwt.version>0.6.0</jjwt.version>

        <github.slug>okta/okta-sdk-java</github.slug>
    </properties>


    <modules>
        <module>swagger-templates</module>
        <module>api</module>
        <module>impl</module>
        <module>httpclient</module>
        <module>integration-tests</module>
        <module>examples</module>
        <module>coverage</module>
    </modules>

    <dependencyManagement>
        <dependencies>

            <!-- Inter project dependencies -->
            <dependency>
                <groupId>com.okta.sdk</groupId>
                <artifactId>okta-sdk-api</artifactId>
                <version>0.7.0</version>
            </dependency>
            <dependency>
                <groupId>com.okta.sdk</groupId>
                <artifactId>okta-sdk-impl</artifactId>
                <version>0.7.0</version>
            </dependency>
            <dependency>
                <groupId>com.okta.sdk</groupId>
                <artifactId>okta-api-swagger-templates</artifactId>
                <version>0.7.0</version>
            </dependency>
            <dependency>
                <groupId>com.okta.sdk</groupId>
                <artifactId>okta-sdk-httpclient</artifactId>
                <version>0.7.0</version>
            </dependency>

            <!-- ITs -->
            <dependency>
                <groupId>com.okta.sdk</groupId>
                <artifactId>okta-sdk-integration-tests</artifactId>
                <version>0.7.0</version>
            </dependency>

            <!-- Examples -->
            <dependency>
                <groupId>com.okta.sdk</groupId>
                <artifactId>okta-sdk-examples-quickstart</artifactId>
                <version>0.7.0</version>
            </dependency>

            <!-- Logging -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.2.2</version>
            </dependency>

            <dependency>
                <groupId>io.jsonwebtoken</groupId>
                <artifactId>jjwt</artifactId>
                <version>${jjwt.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.fasterxml.jackson.core</groupId>
                        <artifactId>jackson-databind</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>joda-time</groupId>
                <artifactId>joda-time</artifactId>
                <version>${jodatime.version}</version>
            </dependency>
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>${snakeyaml.version}</version>
            </dependency>


            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.5.3</version>
            </dependency>

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>java-hamcrest</artifactId>
                <version>2.0.0.0</version>
            </dependency>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>2.7.22</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-simple</artifactId>
                <version>${slf4j.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- transitive dependency versions updated due to owasp scan -->

            <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-annotations</artifactId>
                <version>${jackson.version}</version>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson.dataformat</groupId>
                <artifactId>jackson-dataformat-yaml</artifactId>
                <version>${jackson.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>

        <!-- Test dependencies -->

        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>java-hamcrest</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <configuration>
                        <!-- exclude generated enums coverage -->
                        <excludes>
                            <exclude>**/com/okta/sdk/resource/**/*</exclude>
                            <exclude>**/quickstart/**/*</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.zalando.maven.plugins</groupId>
                    <artifactId>swagger-codegen-maven-plugin</artifactId>
                    <version>0.5.0-beta-1</version>
                    <configuration>
                        <!-- This is relative to a direct sub module -->
                        <apiFile>${project.basedir}/../src/swagger/api.yaml</apiFile>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.okta.sdk</groupId>
                            <artifactId>okta-api-swagger-templates</artifactId>
                            <version>0.7.0</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

  <scm>
    <tag>okta-sdk-root-0.7.0</tag>
  </scm>
</project>
