<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2020-Present, Okta, 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>com.okta.idx.sdk</groupId>
        <artifactId>okta-idx-java-root</artifactId>
        <version>3.0.4</version>
    </parent>

    <artifactId>okta-idx-java-api</artifactId>
    <name>Okta IDX Java SDK :: Api</name>
    <description>
        The Okta IDX Java SDK API .jar provides a Java API that your code can use to make calls to the Okta
        IDX API.
    </description>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>com.okta.commons</groupId>
            <artifactId>okta-config-check</artifactId>
        </dependency>
        <dependency>
            <groupId>com.okta.commons</groupId>
            <artifactId>okta-http-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.okta.commons</groupId>
            <artifactId>okta-commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.okta.commons</groupId>
            <artifactId>okta-http-okhttp</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
        </dependency>

        <!-- Test deps -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-simple</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>ci</id>
            <build>
                <resources>
                    <resource>
                        <directory>src/main/resources</directory>
                        <filtering>false</filtering>
                        <excludes>
                            <exclude>**/version.properties</exclude>
                        </excludes>
                    </resource>
                    <resource>
                        <directory>src/main/resources</directory>
                        <filtering>true</filtering>
                        <includes>
                            <include>**/version.properties</include>
                        </includes>
                    </resource>
                </resources>
                <plugins>
                    <plugin>
                        <groupId>com.github.siom79.japicmp</groupId>
                        <artifactId>japicmp-maven-plugin</artifactId>
                        <version>0.15.7</version>
                        <configuration>
                            <skip>false</skip>
                            <oldVersion>
                                <dependency>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <version>${okta.sdk.previousVersion}</version>
                                    <type>jar</type>
                                </dependency>
                            </oldVersion>
                            <parameter>
                                <onlyModified>true</onlyModified>
                                <breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
                                <breakBuildBasedOnSemanticVersioning>true</breakBuildBasedOnSemanticVersioning>
                                <postAnalysisScript>${root.dir}/src/japicmp/postAnalysisScript.groovy</postAnalysisScript>
                            </parameter>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>

