<?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>

    <parent>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>imani-identity</artifactId>
        <version>0.1.3</version>
    </parent>

    <artifactId>identity-infrastructure</artifactId>
    <packaging>jar</packaging>
    <name>Identity Plugin - Infrastructure</name>
    <description>Adapters and infrastructure implementations - Clean Architecture outermost layer</description>

    <properties>
        <maven.compiler.source>21</maven.compiler.source>
        <maven.compiler.target>21</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <!-- Depend on all inner layers -->
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>identity-domain</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>identity-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>identity-application</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- External dependencies (adapters to external systems) -->
        <!-- Message-based architecture contracts -->
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>messaging-contracts</artifactId>
        </dependency>
        <!-- Caffeine cache for thread-safe bounded caching -->
        <dependency>
            <groupId>com.github.ben-manes.caffeine</groupId>
            <artifactId>caffeine</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.google.errorprone</groupId>
                    <artifactId>error_prone_annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <!-- nostr-java for cryptographic operations -->
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>nostr-java-identity</artifactId>
        </dependency>
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>nostr-java-core</artifactId>
        </dependency>
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>nostr-java-client</artifactId>
        </dependency>
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>nostr-java-event</artifactId>
        </dependency>

        <!-- Awaitility for async waiting in Nostr profile operations -->
        <!-- Override test scope from parent to include at runtime -->
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>compile</scope>
        </dependency>

        <!-- NsecBunker Java for bunker integration -->
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>nsecbunker-core</artifactId>
        </dependency>
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>nsecbunker-connection</artifactId>
        </dependency>
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>nsecbunker-admin</artifactId>
        </dependency>
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>nsecbunker-client</artifactId>
        </dependency>
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>nsecbunker-account</artifactId>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <useModulePath>false</useModulePath>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
