<?xml version="1.0" encoding="UTF-8"?>
<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>

    <artifactId>clients</artifactId>
    <name>${project.artifactId}</name>
    <description>Various client libraries for communicating/streaming with/from the Engine</description>
    <url>https://documentation.noumenadigital.com/</url>

    <licenses>
        <license>
            <name>NPL Maven Plugin License</name>
            <url>https://noumenadigital.com/npl-maven-plugin-license/</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <organization>Noumena Digital</organization>
            <organizationUrl>https://noumenadigital.com/</organizationUrl>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/NoumenaDigital/platform</url>
    </scm>

    <parent>
        <groupId>com.noumenadigital.platform</groupId>
        <artifactId>parent-pom</artifactId>
        <version>2025.2.7</version>
        <relativePath>../parent-pom</relativePath>
    </parent>

    <dependencies>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.qpid</groupId>
            <artifactId>protonj2-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpmime</artifactId>
        </dependency>
        <dependency>
            <groupId>com.noumenadigital.platform</groupId>
            <artifactId>json-mapper</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.noumenadigital.platform</groupId>
            <artifactId>engine-api-values</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.noumenadigital.platform</groupId>
            <artifactId>history-values</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.noumenadigital.platform</groupId>
            <artifactId>monitoring</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.http4k</groupId>
            <artifactId>http4k-server-jetty</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jakarta.servlet</groupId>
            <artifactId>jakarta.servlet-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <groupId>org.apache.maven.plugins</groupId>
            </plugin>
            <plugin>
                <artifactId>kotlin-maven-plugin</artifactId>
                <groupId>org.jetbrains.kotlin</groupId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <!-- format groupId:artifactId:version:classifier:scopes -->
                                        <!-- The clients package should be as lean as possible, to minimize dependency conflicts for our users -->
                                        <exclude>org.springframework:*:*:*:compile</exclude>
                                        <exclude>org.springframework.boot:*:*:*:compile</exclude>
                                        <exclude>io.swagger.core.v3:*:*:*:compile</exclude>
                                        <exclude>org.openapitools:*:*:*:compile</exclude>
                                        <exclude>io.arrow-kt:*:*:*:compile</exclude>

                                        <!-- Noumena "secret sauce" as determined by the TechBoard -->
                                        <exclude>com.noumenadigital.platform:storage-persistent</exclude>
                                        <exclude>com.noumenadigital.platform:history</exclude>
                                        <exclude>com.noumenadigital.platform:history-services</exclude>
                                        <exclude>com.noumenadigital.platform:history-storage</exclude>
                                        <exclude>com.noumenadigital.platform:*-tests</exclude>
                                    </excludes>
                                    <searchTransitive>true</searchTransitive>
                                    <message>Prohibited dependencies found in build!</message>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
