<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.github.ktestify</groupId>
        <artifactId>ktestify-parent</artifactId>
        <version>1.0.2</version>
    </parent>

    <!-- Project Coordinates -->
    <artifactId>ktestify-core</artifactId>
    <version>1.1.0</version>
    <packaging>jar</packaging>

    <!-- Project Information -->
    <name>ktestify-core</name>
    <description>A comprehensive Kafka testing framework for integration and end-to-end testing</description>
    <url>https://github.com/ktestify/ktestify-core</url>
    <inceptionYear>2025</inceptionYear>

    <!-- Licenses -->
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <!-- Developers -->
    <developers>
        <developer>
            <id>lead-developer</id>
            <name>Nil MALHOMME</name>
            <email>malhomme.nil+oss@icloud.com</email>
        </developer>
    </developers>

    <!-- SCM Information -->
    <scm>
        <connection>scm:git:git://github.com/ktestify/ktestify-core.git</connection>
        <developerConnection>scm:git:ssh://github.com:ktestify/ktestify-core.git</developerConnection>
        <url>https://github.com/ktestify/ktestify-core/tree/main</url>
    </scm>

    <!-- Issue Management -->
    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/ktestify/ktestify-core/issues</url>
    </issueManagement>

    <properties>
        <!-- Module-specific properties (all others inherited from ktestify-parent) -->
        <project.build.finalName>ktestify-core</project.build.finalName>
    </properties>

    <dependencies>
        <!-- ===================================== -->
        <!-- Core Framework Dependencies           -->
        <!-- ===================================== -->

        <!-- Apache Commons -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <!-- Gson for JSON serialization/deserialization -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>

        <!-- Lombok for boilerplate code reduction -->
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>

        <!-- Typesafe Config (HOCON) for configuration management -->
        <dependency>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
        </dependency>

        <!-- XMLUnit for XML testing -->
        <dependency>
            <groupId>org.xmlunit</groupId>
            <artifactId>xmlunit-core</artifactId>
        </dependency>

        <!-- ===================================== -->
        <!-- Logging Dependencies                  -->
        <!-- ===================================== -->

        <!-- SLF4J API for logging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <!-- Log4j2 — SLF4J 2.x binding -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j2-impl</artifactId>
        </dependency>

        <!-- Log4j2 API -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>

        <!-- Log4j2 Core -->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
        </dependency>

        <!-- ===================================== -->
        <!-- Kafka Dependencies                    -->
        <!-- ===================================== -->
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
        </dependency>

        <!-- Confluent Kafka dependencies -->
        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-schema-registry-client</artifactId>
        </dependency>

        <dependency>
            <groupId>io.confluent</groupId>
            <artifactId>kafka-avro-serializer</artifactId>
        </dependency>

        <!-- Avro (used directly for GenericRecord, Schema, etc.) -->
        <dependency>
            <groupId>org.apache.avro</groupId>
            <artifactId>avro</artifactId>
        </dependency>

        <!-- ===================================== -->
        <!-- Test Dependencies                     -->
        <!-- ===================================== -->

        <!-- JUnit 5 -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
        </dependency>

        <!-- Mockito for mocking -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>

        <!-- Testcontainers for integration testing -->
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
        </dependency>

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers-junit-jupiter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers-kafka</artifactId>
        </dependency>
    </dependencies>

    <build>
        <finalName>${project.build.finalName}</finalName>

        <plugins>
            <!-- ===================================== -->
            <!-- JaCoCo for Code Coverage              -->
            <!-- ===================================== -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>jacoco-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>verify</phase>
                        <configuration>
                            <rules>
                                <rule>
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit>
                                            <counter>LINE</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.70</minimum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
