<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright © 2021-present Arcade Data Ltd (info@arcadedata.com)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

    SPDX-FileCopyrightText: 2021-present Arcade Data Ltd (info@arcadedata.com)
    SPDX-License-Identifier: Apache-2.0
-->
<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>com.arcadedb</groupId>
        <artifactId>arcadedb-parent</artifactId>
        <version>26.7.1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>arcadedb-ha-raft</artifactId>
    <packaging>jar</packaging>
    <name>ArcadeDB HA Raft</name>

    <properties>
        <ratis.version>3.2.2</ratis.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.arcadedb</groupId>
            <artifactId>arcadedb-engine</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>com.arcadedb</groupId>
            <artifactId>arcadedb-network</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>com.arcadedb</groupId>
            <artifactId>arcadedb-server</artifactId>
            <version>${project.parent.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.arcadedb</groupId>
            <artifactId>arcadedb-server</artifactId>
            <version>${project.parent.version}</version>
            <scope>test</scope>
            <type>test-jar</type>
        </dependency>

        <!-- Apache Ratis -->
        <dependency>
            <groupId>org.apache.ratis</groupId>
            <artifactId>ratis-server</artifactId>
            <version>${ratis.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ratis</groupId>
            <artifactId>ratis-grpc</artifactId>
            <version>${ratis.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ratis</groupId>
            <artifactId>ratis-metrics-default</artifactId>
            <version>${ratis.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.ratis</groupId>
            <artifactId>ratis-test</artifactId>
            <version>${ratis.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- MiniRaftCluster and RaftTestUtil are in test-jars of ratis-server and ratis-grpc.
             BaseTest (used by MiniRaftCluster) lives in the ratis-common test-jar. -->
        <dependency>
            <groupId>org.apache.ratis</groupId>
            <artifactId>ratis-common</artifactId>
            <version>${ratis.version}</version>
            <scope>test</scope>
            <type>test-jar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.ratis</groupId>
            <artifactId>ratis-server</artifactId>
            <version>${ratis.version}</version>
            <scope>test</scope>
            <type>test-jar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.ratis</groupId>
            <artifactId>ratis-grpc</artifactId>
            <version>${ratis.version}</version>
            <scope>test</scope>
            <type>test-jar</type>
        </dependency>

        <!-- Test dependencies -->
        <!-- arcadedb-integration is needed at runtime for the "backup database" SQL command -->
        <dependency>
            <groupId>com.arcadedb</groupId>
            <artifactId>arcadedb-integration</artifactId>
            <version>${project.parent.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- SLF4J-JDK14 bridge: routes Ratis SLF4J logs through java.util.logging
             so they appear in ArcadeDB's AnsiLogFormatter format.
             Do NOT add logback-classic here; it would hijack SLF4J binding. -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jdk14</artifactId>
            <version>${slf4j.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
