<?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>org.bsc.langgraph4j</groupId>
        <artifactId>langgraph4j-parent</artifactId>
        <version>1.8.18</version>
    </parent>

    <artifactId>langgraph4j-dynamodb-saver</artifactId>
    <packaging>jar</packaging>

    <description>Amazon DynamoDB Checkpoint Saver for LangGraph4j</description>
    <name>langgraph4j::dynamodb-saver</name>
    <url>https://github.com/langgraph4j/langgraph4j</url>

    <scm>
        <connection>scm:git:https://github.com/langgraph4j/langgraph4j.git</connection>
        <developerConnection>scm:git:https://github.com/langgraph4j/langgraph4j.git</developerConnection>
        <url>https://github.com/langgraph4j/langgraph4j</url>
        <tag>HEAD</tag>
    </scm>

    <properties>
        <aws.sdk.version>2.27.21</aws.sdk.version>
        <testcontainers.version>1.21.3</testcontainers.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.testcontainers</groupId>
                <artifactId>testcontainers-bom</artifactId>
                <version>${testcontainers.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>

        <!-- LangGraph4j core -->
        <dependency>
            <groupId>${project.parent.groupId}</groupId>
            <artifactId>langgraph4j-core</artifactId>
            <version>${project.parent.version}</version>
        </dependency>

        <!-- AWS SDK v2 – DynamoDB (Enhanced Client included) -->
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>dynamodb</artifactId>
            <version>${aws.sdk.version}</version>
        </dependency>

        <!-- AWS SDK v2 – S3 (optional, for large-payload offloading) -->
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>s3</artifactId>
            <version>${aws.sdk.version}</version>
            <optional>true</optional>
        </dependency>

        <!-- AWS SDK v2 – URL Connection HTTP client (lightweight, no Netty) -->
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>url-connection-client</artifactId>
            <version>${aws.sdk.version}</version>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.15.2</version>
            <scope>test</scope>
        </dependency>

        <!-- Testcontainers -->
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>minio</artifactId>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- Integration tests (ITest suffix) are excluded from unit test run -->
                    <excludes>
                        <exclude>**/*ITest.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
