<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>
	<groupId>io.metaloom.qdrant</groupId>
	<artifactId>qdrant-java-client</artifactId>
	<version>0.10.0</version>

	<parent>
		<groupId>io.metaloom</groupId>
		<artifactId>maven-parent</artifactId>
		<version>1.0.0</version>
	</parent>

	<packaging>pom</packaging>
	<name>Qdrant Java Client</name>
	<description>Java client for REST / gRPC connections to the Qdrant vector
		database.</description>
	<inceptionYear>2023</inceptionYear>

	<modules>
		<module>common</module>
		<module>http</module>
		<module>grpc</module>
		<module>report</module>
	</modules>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<okhttp.version>4.10.0</okhttp.version>
		<grpc.version>1.52.1</grpc.version>
		<!-- Sonar -->
		<jacoco.version>0.8.8</jacoco.version>
		<sonar.version>3.9.1.2184</sonar.version>
		<sonar.coverage.jacoco.xmlReportPaths>
			${project.basedir}/../report/target/site/jacoco-aggregate/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
	</properties>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<dependencies>
		<!--Test-->
		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>testcontainers</artifactId>
			<version>1.17.6</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.11.0</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.assertj</groupId>
			<artifactId>assertj-core</artifactId>
			<version>3.24.0</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<profiles>
		<profile>
			<id>coverage</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.jacoco</groupId>
						<artifactId>jacoco-maven-plugin</artifactId>
						<version>${jacoco.version}</version>
						<configuration>
							<destFile>${sonar.jacoco.reportPath}</destFile>
							<append>true</append>
						</configuration>
						<executions>
							<execution>
								<id>prepare-agent</id>
								<goals>
									<goal>prepare-agent</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>sonar</id>
			<properties>
				<sonar.host.url>https://sonarcloud.io</sonar.host.url>
				<sonar.organization>metaloom</sonar.organization>
				<sonar.projectKey>metaloom_qdrant-java-client</sonar.projectKey>
				<sonar.moduleKey>${project.groupId}:${project.artifactId}</sonar.moduleKey>
				<sonar.report>${aggregate.report.dir}</sonar.report>
			</properties>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonarsource.scanner.maven</groupId>
						<artifactId>sonar-maven-plugin</artifactId>
						<version>${sonar.version}</version>
						<executions>
							<execution>
								<phase>verify</phase>
								<goals>
									<goal>sonar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<release>17</release>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco.version}</version>
				<executions>
					<execution>
						<id>report-aggregate</id>
						<phase>verify</phase>
						<goals>
							<goal>report-aggregate</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>