<!--

    Kipes SDK - The High-Level Event Processing SDK.
    Copyright © 2023 kipe.io

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

-->
<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>io.kipe</groupId>
	<artifactId>kipes-sdk</artifactId>
	<version>0.1-RC</version>
	<packaging>pom</packaging>

	<name>Kipes SDK</name>
	<description>The High-Level Event Processing SDK.</description>
	<url>https://github.com/kipe-io/kipes-sdk</url>
	<inceptionYear>2023</inceptionYear>

	<!-- =================================================================== -->
	<!-- organizational stuff -->
	<!-- =================================================================== -->

	<organization>
		<name>kipe.io</name>
		<url>https://kipe.io</url>
	</organization>
	
	<developers>
		<developer>
			<id>jens-guenther</id>
			<name>Jens Guenther</name>
			<organization>kipe.io</organization>
			<roles><role>Maintainer</role></roles>
		</developer>
		<developer>
			<id>yianni</id>
			<name>John Gerassimou</name>
			<roles><role>Contributor</role></roles>
		</developer>
	</developers>
	
	<licenses>
		<license>
			<name>GNU Lesser General Public License v3.0</name>
			<url>https://www.gnu.org/licenses/lgpl-3.0.en.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<!-- =================================================================== -->
	<!-- global properties -->
	<!-- =================================================================== -->

	<properties>
		<maven.compiler.release>11</maven.compiler.release>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<confluent.version>7.3.2</confluent.version>
		<lombok.version>1.18.26</lombok.version>
		<maven.version>3.8.1</maven.version>
		<mockito.version>5.2.0</mockito.version>
		<release.version>11</release.version>
		<retrofit.version>2.9.0</retrofit.version>
	</properties>

	<!-- =================================================================== -->
	<!-- modules -->
	<!-- =================================================================== -->

	<modules>
		<module>streams-kafka-test</module>
		<module>streams-kafka</module>
		<module>streams-kafka-micronaut</module>
	</modules>

	<!-- =================================================================== -->
	<!-- dependencies -->
	<!-- =================================================================== -->

	<repositories>
		<repository>
			<id>central</id>
			<name>Maven Central</name>
			<url>https://repo.maven.apache.org/maven2/</url>
		</repository>
		<repository>
			<id>confluent</id>
			<url>https://packages.confluent.io/maven/</url>
		</repository>
	</repositories>

	<dependencyManagement>
		<dependencies>

			<!-- =========================================================== -->
			<!-- EXTERNAL DEPENDENCIES -->
			<!-- =========================================================== -->

			<dependency>
				<groupId>com.squareup.retrofit2</groupId>
				<artifactId>converter-jackson</artifactId>
				<version>${retrofit.version}</version>
			</dependency>
			<dependency>
				<groupId>com.squareup.retrofit2</groupId>
				<artifactId>retrofit</artifactId>
				<version>${retrofit.version}</version>
			</dependency>
			<dependency>
				<groupId>io.confluent</groupId>
				<artifactId>kafka-streams-avro-serde</artifactId>
				<version>${confluent.version}</version>
			</dependency>
			<dependency>
				<groupId>io.confluent</groupId>
				<artifactId>kafka-streams-json-schema-serde</artifactId>
				<version>${confluent.version}</version>
			</dependency>
			<dependency>
				<groupId>io.confluent</groupId>
				<artifactId>kafka-streams-protobuf-serde</artifactId>
				<version>${confluent.version}</version>
			</dependency>
			<dependency>
				<groupId>io.micronaut.kafka</groupId>
				<artifactId>micronaut-kafka-streams</artifactId>
				<version>4.5.2</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-math3</artifactId>
				<version>3.6.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.kafka</groupId>
				<artifactId>kafka-streams</artifactId>
				<version>3.4.0</version>
			</dependency>
			<dependency>
				<groupId>org.projectlombok</groupId>
				<artifactId>lombok</artifactId>
				<version>${lombok.version}</version>
			</dependency>

			<!-- ========================================================== -->
			<!-- TEST DEPENDENCIES -->
			<!-- ========================================================== -->

			<dependency>
				<groupId>org.apache.kafka</groupId>
				<artifactId>kafka-streams-test-utils</artifactId>
				<version>3.4.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.awaitility</groupId>
				<artifactId>awaitility</artifactId>
				<version>4.2.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter</artifactId>
				<version>5.9.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-junit-jupiter</artifactId>
				<version>${mockito.version}</version>
				<scope>test</scope>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<!-- =================================================================== -->
	<!-- build management -->
	<!-- =================================================================== -->

	<build>
		<finalName>${project.groupId}.${project.artifactId}-${project.version}</finalName>

		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>4.1</version>
					<configuration>
						<licenseSets>
							<licenseSet>
								<header>license-header.yaml</header>
								<excludes>
									<exclude>**/*.md</exclude>
									<exclude>**/*.txt</exclude>
									<exclude>**/documentation/**</exclude>
									<exclude>**/resources/**</exclude>
								</excludes>
							</licenseSet>
						</licenseSets>
					</configuration>
					<executions>
						<execution>
							<goals>
								<goal>check</goal>
							</goals>
							<phase>validate</phase>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-enforcer-plugin</artifactId>
					<version>3.2.1</version>
					<executions>
						<execution>
							<id>enforce-maven</id>
							<goals>
								<goal>enforce</goal>
							</goals>
							<configuration>
								<rules>
									<requireMavenVersion>
										<version>${maven.version}</version>
									</requireMavenVersion>
								</rules>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>3.2.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.10.1</version>
					<configuration>
						<useIncrementalCompilation>true</useIncrementalCompilation>
						<annotationProcessorPaths>
							<path>
								<groupId>org.projectlombok</groupId>
								<artifactId>lombok</artifactId>
								<version>${lombok.version}</version>
							</path>
						</annotationProcessorPaths>
					</configuration>
					<executions>
						<execution>
							<id>test-compile</id>
							<goals>
								<goal>testCompile</goal>
							</goals>
							<configuration>
								<annotationProcessorPaths>
									<path>
										<groupId>org.projectlombok</groupId>
										<artifactId>lombok</artifactId>
										<version>${lombok.version}</version>
									</path>
								</annotationProcessorPaths>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>3.1.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>3.3.0</version>
					<configuration>
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
							<manifestEntries>
								<Specification-Title>
									${project.name}
								</Specification-Title>
								<Specification-Version>
									${project.version}
								</Specification-Version>
								<Specification-Vendor>
									${project.organization.name}
								</Specification-Vendor>
								<Implementation-Title>
									${project.name}
								</Implementation-Title>
								<Implementation-Version>
									${project.version}
								</Implementation-Version>
								<Implementation-Vendor>
									${project.organization.name}
								</Implementation-Vendor>
								<Implementation-Vendor-Id>
									${project.groupId}
								</Implementation-Vendor-Id>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-dependency-plugin</artifactId>
					<version>3.5.0</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-enforcer-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.4.1</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>3.0.0</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>3.3.0</version>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>versions-maven-plugin</artifactId>
				<version>2.14.2</version>
			</plugin>
			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release-kipe</id>
			<build>
				<plugins>
					<plugin>
						<artifactId>maven-source-plugin</artifactId>
						<version>3.2.1</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>3.5.0</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<detectLinks />
							<javadocExecutable>${java.home}/bin/javadoc</javadocExecutable>
							<release>${target.jdk}</release>
							<show>public</show>
							<version>true</version>
							<failOnError>false</failOnError>
							<failOnWarnings>false</failOnWarnings>
							<quiet>true</quiet>
						</configuration>
					</plugin>
					<plugin>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>3.0.1</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<!-- Prevent `gpg` from using pinentry programs -->
									<gpgArguments>
										<arg>--local-user</arg>
										<arg>io.kipe</arg>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-release-plugin</artifactId>
						<version>3.0.0</version>
						<configuration>
							<autoVersionSubmodules>true</autoVersionSubmodules>
							<useReleaseProfile>false</useReleaseProfile>
							<releaseProfiles>release</releaseProfiles>
							<goals>deploy</goals>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.13</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<!-- =================================================================== -->
	<!-- distribution management -->
	<!-- =================================================================== -->

	<scm>
		<connection>scm:git:git://github.com/kipe-io/kipes-sdk.git</connection>
		<developerConnection>scm:git:ssh://github.com/kipe-io/kipes-sdk.git</developerConnection>
		<url>https://github.com/kipe-io/kipes-sdk.git/tree/main</url>
	  <tag>kipes-sdk-0.1-RC</tag>
  </scm>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

</project>
