<?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-customer</artifactId>
    <version>0.5.3</version>
    <packaging>pom</packaging>
    <name>Imani Gateway Customer Wallet</name>
    <description>Customer Wallet Service for wallet operations, voucher management, token DMs, mint operations, wallet sync, and Nostr queries — standalone project extracted from imani-bridge</description>

    <modules>
        <module>gateway-customer-rest</module>
        <module>gateway-customer-it</module>
    </modules>

    <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.24</imani-bom.version>
        <imani-security.version>0.1.0</imani-security.version>
        <imani-nostrdb.version>0.1.2</imani-nostrdb.version>
        <!-- imani-gateway-api and imani-wallet versions are now sourced from imani-bom 0.1.15
             (gateway-api 0.1.6, wallet 0.1.10). Local overrides removed; bump the BOM to move. -->


        <!-- Integration Test Defaults -->
        <skipITs>true</skipITs>
        <skipITs.customer>true</skipITs.customer>

        <!-- Build Plugin Versions -->
        <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
        <maven.surefire.plugin.version>3.5.2</maven.surefire.plugin.version>
        <maven.failsafe.plugin.version>3.2.5</maven.failsafe.plugin.version>
        <spring-boot-maven-plugin.version>3.5.5</spring-boot-maven-plugin.version>
        <jib-maven-plugin.version>3.4.0</jib-maven-plugin.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>

            <!-- imani-gateway-api, wallet-core-nostr, wallet-core-app, wallet-core-cashu,
                 and wallet-core-base versions are managed by imani-bom above. The local
                 dependencyManagement entries that previously redeclared them have been
                 removed in favour of the BOM as single source of truth. -->

            <!-- Security (auth filters) -->
            <dependency>
                <groupId>xyz.tcheeric</groupId>
                <artifactId>imani-security</artifactId>
                <version>${imani-security.version}</version>
            </dependency>

            <!-- Nostrdb -->
            <dependency>
                <groupId>xyz.tcheeric</groupId>
                <artifactId>imani-nostrdb</artifactId>
                <version>${imani-nostrdb.version}</version>
            </dependency>

            <!-- Internal modules -->
            <dependency>
                <groupId>xyz.tcheeric</groupId>
                <artifactId>gateway-customer-rest</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <parameters>true</parameters>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.plugin.version}</version>
                    <configuration>
                        <useModulePath>false</useModulePath>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${maven.failsafe.plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </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>
