<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2017-2022 Evolveum
  ~
  ~ 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
  ~
  ~     https://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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.evolveum.midpoint.client</groupId>
    <artifactId>parent</artifactId>
    <version>4.8.4</version>
    <packaging>pom</packaging>

    <modules>
        <module>midpoint-client-api</module>
        <module>midpoint-client-impl-rest-jaxb</module>
        <module>midpoint-client-impl-prism</module>
    </modules>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.source.version>11</project.source.version>

        <midpoint.version>4.8.4</midpoint.version>

        <testng.version>7.6.1</testng.version>
        <cxf.version>4.0.1</cxf.version>
        <!-- Normally both versions are the same but sometimes databind is patched and core stays. -->
        <jackson.version>2.13.4</jackson.version>
        <jackson-databind.version>2.13.4.2</jackson-databind.version>
        <httpclient.version>5.1.3</httpclient.version>
        <jaxb-api.version>3.0.0</jaxb-api.version>
        <jaxb.version>3.0.2</jaxb.version>
        <activation.version>1.2.0</activation.version>
        <surefire.version>3.0.0-M5</surefire.version>
        <javax.annotation.version>1.3.2</javax.annotation.version>
        <commons-lang3.version>3.12.0</commons-lang3.version>
    </properties>

    <scm>
        <connection>https://github.com/Evolveum/midpoint-client-java.git</connection>
        <developerConnection>git@github.com:Evolveum/midpoint-client-java.git</developerConnection>
    </scm>

    <distributionManagement>
        <repository>
            <id>evolveum-nexus</id>
            <name>Internal Releases</name>
            <url>https://nexus.evolveum.com/nexus/content/repositories/releases/</url>
        </repository>

        <snapshotRepository>
            <id>evolveum-nexus</id>
            <name>Internal Releases</name>
            <url>https://nexus.evolveum.com/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>evolveum</id>
            <name>Evolveum Public Releases</name>
            <url>https://nexus.evolveum.com/nexus/content/groups/public/</url>
        </repository>
        <repository>
            <id>evolveum-snapshots</id>
            <name>Evolveum Snapshots</name>
            <url>https://nexus.evolveum.com/nexus/content/repositories/snapshots/</url>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>evolveum</id>
            <name>Evolveum</name>
            <url>https://nexus.evolveum.com/nexus/content/groups/public</url>
        </pluginRepository>
    </pluginRepositories>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-core</artifactId>
                <version>${cxf.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-rs-client</artifactId>
                <version>${cxf.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-transports-local</artifactId>
                <version>${cxf.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-transports-http-jetty</artifactId>
                <version>${cxf.version}</version>
            </dependency>
            <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-databind</artifactId>
                <version>${jackson-databind.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.xml.bind</groupId>
                <artifactId>jakarta.xml.bind-api</artifactId>
                <version>${jaxb-api.version}</version>
            </dependency>
            <dependency>
                <groupId>jakarta.xml.bind-api</groupId>
                <artifactId>jakarta.xml.bind-impl</artifactId>
                <version>${jaxb.version}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.xml.bind</groupId>
                <artifactId>jaxb-core</artifactId>
                <version>${jaxb.version}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.activation</groupId>
                <artifactId>javax.activation</artifactId>
                <version>${activation.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>${javax.annotation.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons-lang3.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                    <configuration>
                        <source>${project.source.version}</source>
                        <target>${project.source.version}</target>
                        <fork>false</fork>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.version}</version>
                    <configuration>
                        <suiteXmlFiles>
                            <suiteXmlFile>testng-unit.xml</suiteXmlFile>
                        </suiteXmlFiles>
                        <properties>
                            <property>
                                <name>suitename</name>
                                <value>unit</value>
                            </property>
                        </properties>
                        <useSystemClassLoader>false</useSystemClassLoader>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.surefire</groupId>
                            <artifactId>surefire-testng</artifactId>
                            <version>${surefire.version}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <dependencies>
        <dependency> <!-- Not used, but required for surefire plugin not to complain -->
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>intest</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${surefire.version}</version>
                        <configuration>
                            <suiteXmlFiles>
                                <suiteXmlFile>testng-integration.xml</suiteXmlFile>
                            </suiteXmlFiles>
                            <properties>
                                <property>
                                    <name>suitename</name>
                                    <value>Integration</value>
                                </property>
                            </properties>
                            <useSystemClassLoader>false</useSystemClassLoader>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
