<?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>io.telicent.smart-caches</groupId>
        <artifactId>parent</artifactId>
        <version>0.40.2</version>
    </parent>
    <artifactId>action-tracker</artifactId>
    <name>Telicent Smart Caches - Action Tracker</name>
    <description>Library that provides APIs for synchronising action state between cooperating
        microservices
    </description>

    <properties>
        <license.header.path>${project.parent.basedir}</license.header.path>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>event-source-kafka</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>projector-driver</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
            <version>${dependency.jackson}</version>
        </dependency>

        <dependency>
            <groupId>io.github.resilience4j</groupId>
            <artifactId>resilience4j-retry</artifactId>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <version>${dependency.awaitility}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>event-source-kafka</artifactId>
            <version>${project.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>kafka</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.commons</groupId>
                    <artifactId>commons-compress</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>docker</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <os>
                    <family>!Windows</family>
                </os>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${plugin.jacoco}</version>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${plugin.surefire}</version>
                        <configuration>
                            <includes>
                                <include>**/Test*.java</include>
                                <include>**/DockerTest*.java</include>
                            </includes>
                            <forkCount>${test.maxForks}</forkCount>
                            <reuseForks>true</reuseForks>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>