<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2020-2025 Confluent, Inc.

-->
<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">
    <parent>
        <groupId>io.confluent.parallelconsumer</groupId>
        <artifactId>parallel-consumer-parent</artifactId>
        <version>0.5.3.3</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <artifactId>parallel-consumer-core</artifactId>
    <name>Confluent Parallel Consumer Core</name>

    <dependencies>
        <!-- Main -->
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>${kafka.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.luben</groupId>
            <artifactId>zstd-jni</artifactId>
            <version>1.5.5-4</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.xerial.snappy</groupId>
            <artifactId>snappy-java</artifactId>
            <version>1.1.10.5</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-core</artifactId>
            <scope>compile</scope>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.awaitility</groupId>
            <artifactId>awaitility</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit-pioneer</groupId>
            <artifactId>junit-pioneer</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>kafka</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>me.tongfei</groupId>
            <artifactId>progressbar</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>postgresql</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>42.7.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock-jre8</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.threeten</groupId>
            <artifactId>threeten-extra</artifactId>
            <version>1.7.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.stubbs.truth</groupId>
            <artifactId>truth-generator-api</artifactId>
            <version>${truth-generator-maven-plugin.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>uk.co.jemos.podam</groupId>
            <artifactId>podam</artifactId>
            <version>8.0.1.RELEASE</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>io.stubbs.truth</groupId>
                <artifactId>truth-generator-maven-plugin</artifactId>
                <version>${truth-generator-maven-plugin.version}</version>
                <configuration>
                    <cleanTargetDir>false</cleanTargetDir>
                    <useHas>false</useHas>
                    <useGetterForLegacyClasses>true</useGetterForLegacyClasses>
                    <releaseTarget>8</releaseTarget>
                    <classes>
                        <class>io.confluent.parallelconsumer.PollContext</class>
                        <class>io.confluent.parallelconsumer.ParallelEoSStreamProcessor</class>
                        <class>io.confluent.parallelconsumer.internal.ProducerManager</class>
                        <class>io.confluent.parallelconsumer.state.WorkContainer</class>
                        <class>io.confluent.parallelconsumer.state.WorkManager</class>
                        <class>io.confluent.parallelconsumer.state.PartitionState</class>
                        <class>io.confluent.parallelconsumer.state.ProcessingShard</class>
                        <class>io.confluent.parallelconsumer.state.ShardKey</class>
                        <class>io.confluent.parallelconsumer.offsets.OffsetEncoding</class>
                    </classes>
                    <legacyClasses>
                        <!-- todo check legacy is recursive -->
                        <class>org.apache.kafka.clients.consumer.OffsetAndMetadata</class>
                        <class>org.apache.kafka.clients.consumer.ConsumerRecord</class>
                        <class>org.apache.kafka.clients.consumer.ConsumerRecords</class>
                        <class>org.apache.kafka.clients.consumer.Consumer</class>
                        <class>org.apache.kafka.clients.producer.RecordMetadata</class>
                        <class>org.apache.kafka.clients.producer.ProducerRecord</class>
                        <class>org.apache.kafka.clients.producer.Producer</class>
                    </legacyClasses>
                    <entryPointClassPackage>io.confluent.parallelconsumer</entryPointClassPackage>
                </configuration>
                <executions>
                    <execution>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


</project>
