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

    <groupId>xyz.tcheeric</groupId>
    <artifactId>imani-gateway-api</artifactId>
    <!-- 0.7.0, not another 0.6.x: ReceiveEscrowPort gained three abstract
         methods (claim / settleClaim / releaseClaim), which every implementor
         must now provide. That is a breaking change to a port interface.

         It was previously built and installed under 0.6.2, the version already
         published to the registry without those methods. A local `mvn install`
         overwrote the released jar in ~/.m2, so the same coordinate meant two
         different interfaces depending on which machine resolved it, and
         gateway-customer's main branch stopped compiling with
         "ReceiveEscrowAdapter is not abstract and does not override abstract
         method releaseClaim" — a failure in code nobody had touched. -->

    <!-- 0.8.1 raises the Cashu token length ceiling (CashuTokenBudget). 0.8.0's
         API-02 sweep capped it at 8192 characters, which is BELOW the size a real
         token is: a token carries one ~1840-character proof per set bit of the
         amount, so 1500 sat is seven proofs and 12870 characters. On 2026-09-18
         three sells minted successfully and were then refused at
         POST /api/v1/wallet/receive with "token cannot exceed 8192 characters".

         A NEW VERSION rather than a re-install of 0.8.0: the note above records
         what overwriting a released coordinate already cost once here. -->
    <!-- 0.10.0, not 0.9.1: this adds SURFACE. `BtcRateProvider` is a new port and
         `VOUCHER_009` a new error code, which is "minor for new surface" under this
         repo's own rule. Nothing existing changed shape, so a consumer that
         references neither compiles and behaves exactly as before.

         It has to ship before gateway-customer 0.12.0, which imports both and
         therefore does not compile against 0.9.0. -->
    <version>0.10.0</version>
    <packaging>jar</packaging>
    <name>Imani Gateway API</name>
    <description>API contracts, DTOs, and port interfaces for the Imani Gateway REST API — the single source of truth for all REST API contracts</description>

    <properties>
        <java.version>21</java.version>
        <maven.compiler.source>${java.version}</maven.compiler.source>
        <maven.compiler.target>${java.version}</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <imani-bom.version>0.1.87</imani-bom.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>xyz.tcheeric</groupId>
                <artifactId>imani-bom</artifactId>
                <version>${imani-bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!-- Validation -->
        <dependency>
            <groupId>jakarta.validation</groupId>
            <artifactId>jakarta.validation-api</artifactId>
        </dependency>

        <!--
          A real validator, test scope only.

          The API-* findings are about constraints that are declared and do not run: API-04 was
          exactly that — the annotations were present, visible in review, and inert, because
          Jakarta Validation does not recurse into a nested object without @Valid. A test that
          inspects annotations would have passed against the vulnerable code, so the contract
          tests execute a real Hibernate Validator instead. This stays test-scoped: consumers
          bring their own provider via Spring Boot.
        -->
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.expressly</groupId>
            <artifactId>expressly</artifactId>
            <version>5.0.0</version>
            <scope>test</scope>
        </dependency>

        <!-- Jackson for JSON serialization -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
        </dependency>

        <!-- Identity Domain for shared types -->
        <dependency>
            <groupId>xyz.tcheeric</groupId>
            <artifactId>identity-domain</artifactId>
        </dependency>

        <!-- Testing -->
        <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>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <parameters>true</parameters>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.2</version>
                <configuration>
                    <useModulePath>false</useModulePath>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <distributionManagement>
        <repository>
            <id>reposilite-releases</id>
            <url>https://maven.398ja.xyz/releases</url>
        </repository>
        <snapshotRepository>
            <id>reposilite-snapshots</id>
            <url>https://maven.398ja.xyz/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>central</id>
            <url>https://repo.maven.apache.org/maven2</url>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>false</enabled></snapshots>
        </repository>
        <repository>
            <id>reposilite-releases</id>
            <url>https://maven.398ja.xyz/releases</url>
        </repository>
        <repository>
            <id>reposilite-snapshots</id>
            <url>https://maven.398ja.xyz/snapshots</url>
        </repository>
    </repositories>

</project>
