<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://maven.apache.org/POM/4.0.0" 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>org.springframework.cloud.stream.app</groupId>
		<artifactId>stream-applications-core</artifactId>
		<version>4.0.0-SNAPSHOT</version>
		<relativePath>../../stream-applications-core/pom.xml</relativePath>
	</parent>

	<properties>
		<json-unit.version>1.25.1</json-unit.version>
	</properties>

	<artifactId>debezium-source</artifactId>
	<name>debezium-source</name>
	<description>Debezium source apps</description>
	<packaging>jar</packaging>

	<dependencies>
		<dependency>
			<groupId>org.springframework.cloud.fn</groupId>
			<artifactId>debezium-supplier</artifactId>
			<version>${java-functions.version}</version>
		</dependency>

		<!-- TEST -->
		<dependency>
			<groupId>org.springframework.cloud.fn</groupId>
			<artifactId>function-test-support</artifactId>
			<version>${java-functions.version}</version>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<groupId>ch.qos.logback</groupId>
					<artifactId>logback-classic</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud.stream.app</groupId>
			<artifactId>stream-applications-test-support</artifactId>
			<version>${stream-apps-core.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>net.javacrumbs.json-unit</groupId>
			<artifactId>json-unit</artifactId>
			<version>${json-unit.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework.cloud</groupId>
			<artifactId>spring-cloud-stream-binder-kafka</artifactId>
			<scope>test</scope>
		</dependency>

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

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

		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>${testcontainers.version}</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>mysql</artifactId>
			<version>${testcontainers.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.zaxxer</groupId>
			<artifactId>HikariCP</artifactId>
			<version>4.0.3</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-server</artifactId>
			<version>11.0.14</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>jakarta.servlet</groupId>
			<artifactId>jakarta.servlet-api</artifactId>
			<version>6.0.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
			<version>8.0.33</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>io.debezium</groupId>
			<artifactId>debezium-testing-testcontainers</artifactId>
			<version>2.3.3.Final</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>mssqlserver</artifactId>
			<version>${testcontainers.version}</version>
			<scope>test</scope>
		</dependency>
 	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<skip>false</skip>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dataflow-apps-docs-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.springframework.cloud</groupId>
				<artifactId>spring-cloud-dataflow-apps-generator-plugin</artifactId>
				<configuration>
					<application>
						<name>debezium</name>
						<type>source</type>
						<version>${project.version}</version>
						<configClass>AUTOCONFIGURATION</configClass>
						<functionDefinition>debeziumSupplier</functionDefinition>

						<properties>
							<spring.autoconfigure.exclude>org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration</spring.autoconfigure.exclude>
							<spring.cloud.stream.kafka.default.producer.messageKeyExpression>headers['debezium_key']</spring.cloud.stream.kafka.default.producer.messageKeyExpression>
						</properties>
						<maven>
							<dependencies>
								<dependency>
									<groupId>org.springframework.cloud.fn</groupId>
									<artifactId>debezium-supplier</artifactId>
								</dependency>
								<dependency>
									<groupId>org.springframework.cloud.stream.app</groupId>
									<artifactId>stream-applications-composite-function-support</artifactId>
									<version>${stream-apps-core.version}</version>
								</dependency>
							</dependencies>
						</maven>
					</application>
				</configuration>
			</plugin>
		</plugins>
	</build>

</project>
