<?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.quarkiverse.langfuse</groupId>
		<artifactId>quarkus-langfuse-parent</artifactId>
		<version>0.2.3</version>
	</parent>
	<artifactId>quarkus-langfuse-deployment</artifactId>
	<name>Quarkus Langfuse - Deployment</name>

	<dependencies>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-arc-deployment</artifactId>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-core-deployment</artifactId>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-rest-client-jackson-deployment</artifactId>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-opentelemetry-deployment</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>io.quarkiverse.langchain4j</groupId>
			<artifactId>quarkus-langchain4j-core-deployment</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-qute-deployment</artifactId>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-jackson-deployment</artifactId>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-devservices-deployment</artifactId>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-devui-deployment-spi</artifactId>
		</dependency>
		<dependency>
			<groupId>io.quarkiverse.langfuse</groupId>
			<artifactId>quarkus-langfuse</artifactId>
			<version>${project.version}</version>
		</dependency>
		<!-- Temporary: the runtime module embeds langfuse-client classes via
		     maven-dependency-plugin unpack, but that is invisible to IntelliJ's
		     module dependency graph. This provided-scope dependency lets the IDE
		     resolve com.langfuse.api.* types used by runtime classes.
		     Remove once langfuse-client is published as a standalone artifact
		     and the runtime module can declare it as a regular (non-optional)
		     dependency. -->
		<dependency>
			<groupId>io.quarkiverse.langfuse</groupId>
			<artifactId>quarkus-langfuse-client</artifactId>
			<version>${project.version}</version>
			<scope>provided</scope>
		</dependency>
		<!-- Temporary: local copy of langfuse-java-testcontainers until
		     https://github.com/langfuse/langfuse-java/pull/36 is merged and released.
		     Remove this dependency, the unpack plugin execution below, and the
		     testcontainers module dependencies (postgresql, clickhouse, minio, redis)
		     once com.langfuse:langfuse-java-testcontainers is available on Maven Central. -->
		<dependency>
			<groupId>io.quarkiverse.langfuse</groupId>
			<artifactId>quarkus-langfuse-testcontainers</artifactId>
			<version>${project.version}</version>
			<optional>true</optional>
		</dependency>
		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>testcontainers</artifactId>
			<exclusions>
				<exclusion>
					<groupId>junit</groupId>
					<artifactId>junit</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- Temporary: required by the unpacked quarkus-langfuse-testcontainers classes.
		     Remove when switching to the released com.langfuse:langfuse-java-testcontainers. -->
		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>testcontainers-postgresql</artifactId>
		</dependency>
		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>testcontainers-clickhouse</artifactId>
		</dependency>
		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>testcontainers-minio</artifactId>
		</dependency>
		<dependency>
			<groupId>com.redis</groupId>
			<artifactId>testcontainers-redis</artifactId>
			<version>${testcontainers-redis.version}</version>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-opentelemetry-deployment</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>io.quarkus</groupId>
			<artifactId>quarkus-junit-internal</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>io.quarkiverse.wiremock</groupId>
			<artifactId>quarkus-wiremock-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- Temporary: see quarkus-langfuse-testcontainers dependency comment above -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>unpack-langfuse-testcontainers</id>
						<phase>prepare-package</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>io.quarkiverse.langfuse</groupId>
									<artifactId>quarkus-langfuse-testcontainers</artifactId>
									<version>${project.version}</version>
									<outputDirectory>${project.build.outputDirectory}</outputDirectory>
									<excludes>META-INF/MANIFEST.MF,META-INF/maven/**</excludes>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<executions>
					<execution>
						<id>default-compile</id>
						<configuration>
							<annotationProcessorPaths>
								<path>
									<groupId>io.quarkus</groupId>
									<artifactId>quarkus-extension-processor</artifactId>
									<version>${quarkus.version}</version>
								</path>
							</annotationProcessorPaths>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
