<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.github.a2asdk</groupId>
        <artifactId>a2a-java-sdk-parent</artifactId>
        <version>1.0.0.Alpha3</version>
        <relativePath>../../../pom.xml</relativePath>
    </parent>

    <artifactId>a2a-java-sdk-examples-cloud-deployment-server</artifactId>

    <name>A2A Java SDK - Cloud Deployment Example Server</name>
    <description>Example demonstrating A2A agent deployment in Kubernetes with database persistence and event replication</description>

    <dependencies>
        <!-- Core A2A SDK with JSON-RPC transport. This pulls in the rest of the needed a2a-java dependencies -->
        <dependency>
            <groupId>io.github.a2asdk</groupId>
            <artifactId>a2a-java-sdk-reference-jsonrpc</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Database-backed task store -->
        <dependency>
            <groupId>io.github.a2asdk</groupId>
            <artifactId>a2a-java-extras-task-store-database-jpa</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Database-backed push notification config store -->
        <dependency>
            <groupId>io.github.a2asdk</groupId>
            <artifactId>a2a-java-extras-push-notification-config-store-database-jpa</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Replicated queue manager core -->
        <dependency>
            <groupId>io.github.a2asdk</groupId>
            <artifactId>a2a-java-queue-manager-replicated-core</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!-- Provides the MicroProfile Reactive Messaging ReplicationStrategy for the replicated queue manager-->
        <dependency>
            <groupId>io.github.a2asdk</groupId>
            <artifactId>a2a-java-queue-manager-replication-mp-reactive</artifactId>
            <version>${project.version}</version>
        </dependency>

        <!--
            MicroProfile Reactive Messaging support including the Kafka connector, used by the MP RM
            ReplicationStrategy
        -->
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-messaging-kafka</artifactId>
        </dependency>

        <!-- PostgreSQL JDBC driver -->
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-jdbc-postgresql</artifactId>
        </dependency>

        <!-- Quarkus Hibernate ORM -->
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-hibernate-orm</artifactId>
        </dependency>

        <!-- Quarkus Health checks -->
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-smallrye-health</artifactId>
        </dependency>

        <dependency>
            <groupId>io.github.a2asdk</groupId>
            <artifactId>a2a-java-sdk-client</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-maven-plugin</artifactId>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>build</goal>
                            <goal>generate-code</goal>
                            <goal>generate-code-tests</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <release>17</release>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>native</id>
            <properties>
                <quarkus.package.type>native</quarkus.package.type>
            </properties>
        </profile>
    </profiles>
</project>
