<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright (c) 2025 Evolveum and contributors
  ~
  ~ This work is licensed under European Union Public License v1.2. See LICENSE file for details.
  ~
  -->
<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>

    <parent>
        <groupId>com.evolveum.polygon.scimrest</groupId>
        <artifactId>connector-scimrest-parent</artifactId>
        <version>0.1-preview-mcm</version>
    </parent>

    <artifactId>connector-scimrest-common</artifactId>
    <version>0.1-preview-mcm</version>
    <packaging>jar</packaging>

    <name>Polygon SCIM 2 Connector - Common Implementation</name>

    <properties>
        <project.source.version>17</project.source.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.unboundid.product.scim2</groupId>
            <artifactId>scim2-sdk-client</artifactId>
        </dependency>
        <dependency>
            <groupId>com.evolveum.polygon</groupId>
            <artifactId>connector-common</artifactId>
        </dependency>
        <dependency>
            <groupId>net.tirasa.connid</groupId>
            <artifactId>connector-framework-contract</artifactId>
            <version>${connId.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.groovy</groupId>
            <artifactId>groovy</artifactId>
            <version>${groovy.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <type>pom</type>
            <version>${groovy.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.groovy</groupId>
            <artifactId>groovy-astbuilder</artifactId>
            <version>${groovy.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.10.1</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.18.3</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-json-org</artifactId>
            <version>2.18.3</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.security</groupId>
            <artifactId>oauth2-client</artifactId>
            <version>3.1.10</version>
        </dependency>
        <dependency>
            <groupId>org.wiremock</groupId>
            <artifactId>wiremock</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>4.2.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generateStubs</goal>
                            <goal>compile</goal>
                            <goal>generateTestStubs</goal>
                            <goal>compileTests</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>dependencytrack</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>io.github.pmckeown</groupId>
                        <artifactId>dependency-track-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>upload-bom</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>upload-bom</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>