<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~
  ~                         _ _        ____  ____
  ~               _____   _(_) |_ __ _|  _ \| __ )
  ~              / _ \ \ / / | __/ _` | | | |  _ \
  ~             |  __/\ V /| | || (_| | |_| | |_) |
  ~              \___| \_/ |_|\__\__,_|____/|____/
  ~
  ~   Copyright (c) 2023
  ~
  ~   Licensed under the Business Source License, Version 1.1 (the "License");
  ~   you may not use this file except in compliance with the License.
  ~   You may obtain a copy of the License at
  ~
  ~   https://github.com/FgForrest/evitaDB/blob/main/LICENSE
  ~
  ~   Unless required by applicable law or agreed to in writing, software
  ~   distributed under the License is distributed on an "AS IS" BASIS,
  ~   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~   See the License for the specific language governing permissions and
  ~   limitations under the License.
  -->

<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.evitadb</groupId>
	<artifactId>evita_root</artifactId>
	<version>0.7.ALPHA</version>
	<packaging>pom</packaging>
	<name>evitaDB - Root &amp; modules aggregator</name>
	<url>https://evitadb.io</url>
	<description>
		Evita is a specialized database with easy-to-use API for e-commerce systems. Purpose of this research is
		creating fast and scalable engine that handles all complex tasks that e-commerce systems has to deal with on
		daily basis.

		Evita should operate as a fast secondary lookup / search index used by application frontends. We aim for order
		of magnitude better latency (10x faster or better) for common e-commerce tasks than other solutions based on SQL
		or NoSQL databases on the same hardware specification. Evita should not be used for storing and handling primary
		data, and we don't aim for ACID properties nor data corruption guarantees. Evita "index" must be treated
		as something that could be dropped any time and built up from scratch easily again.
	</description>

	<developers>
		<developer>
			<id>JNO</id>
			<email>novotny@fg.cz</email>
			<name>Ing. Jan Novotný</name>
			<organization>FG Forrest, a.s.</organization>
			<organizationUrl>http://www.fg.cz</organizationUrl>
		</developer>
		<developer>
			<id>LHO</id>
			<email>hornych@fg.cz</email>
			<name>Bc. Lukáš Hornych</name>
			<organization>FG Forrest, a.s.</organization>
			<organizationUrl>http://www.fg.cz</organizationUrl>
		</developer>
		<developer>
			<id>TPO</id>
			<name>Bc. Tomáš Pozler</name>
		</developer>
	</developers>

	<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>

	<licenses>
		<license>
			<name>Business Source License 1.1</name>
			<url>https://github.com/FgForrest/evitaDB/blob/master/LICENSE</url>
			<distribution>repo</distribution>
			<comments>
				Permissive source available, OSS friendly license.
				Free to use for commercial and non-commercial purposes.
				See https://evitadb.io/documentation/use/license for more information.
			</comments>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:ssh://git@github.com/FgForrest/evitaDB</connection>
		<developerConnection>scm:git:ssh://git@github.com/FgForrest/evitaDB</developerConnection>
		<url>https://evitadb.io/</url>
		<tag>RELEASE-0_7_ALPHA</tag>
	</scm>

	<organization>
		<name>FG Forrest, a.s.</name>
		<url>http://www.fg.cz</url>
	</organization>

	<properties>
		<java.version>17</java.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<slf4j.version>2.0.1</slf4j.version>
		<logback.version>1.4.4</logback.version>
		<kryo.version>5.0.3</kryo.version>
		<jackson.version>2.14.0</jackson.version>
		<roaringbitmap.version>0.9.25</roaringbitmap.version>
		<junit.jupiter.version>5.9.1</junit.jupiter.version>
		<maven.compiler.version>3.10.1</maven.compiler.version>
		<maven.toolchains.version>3.0.0</maven.toolchains.version>
		<jboss.version>3.5.0.Final</jboss.version>
		<lombok.version>1.18.24</lombok.version>
		<grpc.version>1.52.1</grpc.version>
		<bouncyCastle.version>1.70</bouncyCastle.version>
		<!--Compatible versions with gRPC could be found here: https://github.com/grpc/grpc-java/blob/master/SECURITY.md#netty -->
		<nettyHandler.version>4.1.79.Final</nettyHandler.version>
	</properties>

	<modules>
		<module>evita_common</module>
		<module>evita_api</module>
		<module>evita_query</module>
		<module>evita_engine</module>
		<module>evita_db</module>
		<module>evita_store</module>
		<module>evita_external_api</module>
		<module>evita_server</module>
		<module>evita_test_support</module>
		<module>evita_functional_tests</module>
		<module>evita_performance_tests</module>
		<module>workaround/grpc</module>
		<module>workaround/roaringBitmap</module>
		<module>jacoco</module>
	</modules>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>com.esotericsoftware</groupId>
				<artifactId>kryo</artifactId>
				<version>${kryo.version}</version>
			</dependency>
			<dependency>
				<groupId>com.carrotsearch</groupId>
				<artifactId>hppc</artifactId>
				<version>0.9.0</version>
			</dependency>
			<dependency>
				<groupId>net.openhft</groupId>
				<artifactId>zero-allocation-hashing</artifactId>
				<version>0.16</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven.compiler.version}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-toolchains-plugin</artifactId>
				<version>${maven.toolchains.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-core</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.dataformat</groupId>
				<artifactId>jackson-dataformat-yaml</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.module</groupId>
				<artifactId>jackson-module-parameter-names</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.datatype</groupId>
				<artifactId>jackson-datatype-jdk8</artifactId>
				<version>${jackson.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.qos.logback</groupId>
				<artifactId>logback-classic</artifactId>
				<version>${logback.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
			<dependency>
				<groupId>org.jboss.threads</groupId>
				<artifactId>jboss-threads</artifactId>
				<version>${jboss.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.11.0</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>com.google.code.findbugs</groupId>
			<artifactId>jsr305</artifactId>
			<version>3.0.2</version>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>${lombok.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<version>${junit.jupiter.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-params</artifactId>
			<version>${junit.jupiter.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-junit-jupiter</artifactId>
			<version>4.6.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-inline</artifactId>
			<version>4.6.1</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<profiles>
		<!-- using a toolchain when version doesn't match -->
		<profile>
			<id>toolchains</id>
			<activation>
				<jdk>[1.3,17)</jdk>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-toolchains-plugin</artifactId>
						<version>${maven.toolchains.version}</version>
						<executions>
							<execution>
								<goals>
									<goal>toolchain</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<toolchains>
								<jdk>
									<version>${java.version}</version>
									<vendor>openjdk</vendor>
								</jdk>
							</toolchains>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- GPG Signature on release -->
		<profile>
			<id>release-sign-artifacts</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>unit</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<excludedGroups>integration,functional,longRunning,documentation</excludedGroups>
							<parallel>all</parallel>
							<useUnlimitedThreads>true</useUnlimitedThreads>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>unitAndFunctional</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<excludedGroups>integration,longRunning,documentation</excludedGroups>
							<parallel>all</parallel>
							<useUnlimitedThreads>true</useUnlimitedThreads>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>functional</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<groups>functional</groups>
							<parallel>all</parallel>
							<useUnlimitedThreads>true</useUnlimitedThreads>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>documentation</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<groups>documentation</groups>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>longRunning</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<groups>longRunning</groups>
							<parallel>all</parallel>
							<useUnlimitedThreads>true</useUnlimitedThreads>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven.compiler.version}</version>
				<configuration>
					<verbose>true</verbose>
					<fork>true</fork>
					<jdkToolchain>
						<version>${java.version}</version>
					</jdkToolchain>
					<release>${java.version}</release>
					<source>${java.version}</source>
					<target>${java.version}</target>
					<compilerVersion>${java.version}</compilerVersion>
					<compilerArgs>
						<arg>-parameters</arg>
						<arg>--add-exports</arg>
						<arg>ch.qos.logback.core/ch.qos.logback.core.hook=evita.server</arg>
					</compilerArgs>
					<annotationProcessorPaths>
						<path>
							<groupId>org.projectlombok</groupId>
							<artifactId>lombok</artifactId>
							<version>${lombok.version}</version>
						</path>
					</annotationProcessorPaths>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>3.0.0-M7</version>
				<configuration>
					<forkCount>1</forkCount>
					<reuseForks>true</reuseForks>
					<jdkToolchain>
						<version>${java.version}</version>
					</jdkToolchain>
					<argLine>${surefireArgLine} -Xmx4g -Dfile.encoding=${project.build.sourceEncoding} --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.5.0</version>
				<configuration>
					<doclint>none</doclint>
					<failOnError>false</failOnError>
				</configuration>
				<executions>
				    <execution>
				        <id>attach-javadocs</id>
				        <goals>
				            <goal>jar</goal>
				        </goals>
				    </execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>2.8.2</version>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>3.0.1</version>
				<configuration>
					<localCheckout>true</localCheckout>
					<pushChanges>false</pushChanges>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<arguments>-Dgpg.passphrase=${gpg.passphrase} -DskipTests=true</arguments>
					<releaseProfiles>release-sign-artifacts</releaseProfiles>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>2.0.1</version>
					</dependency>
				</dependencies>
			</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>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.1</version>
				<configuration>
					<forceCreation>true</forceCreation>
					<encoding>UTF-8</encoding>
				</configuration>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
					<execution>
						<id>attach-javadoc</id>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration> <!-- add this to disable checking -->
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.8</version>
				<executions>
					<execution>
						<id>prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
						<configuration>
							<append>true</append>
							<!-- Sets the VM argument line used when unit tests are run. -->
							<propertyName>surefireArgLine</propertyName>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.owasp</groupId>
				<artifactId>dependency-check-maven</artifactId>
				<version>7.1.1</version>
				<configuration>
					<format>ALL</format>
					<failBuildOnCVSS>5</failBuildOnCVSS>
					<assemblyAnalyzerEnabled>false</assemblyAnalyzerEnabled>
					<junitFailOnCVSS>5</junitFailOnCVSS>
					<suppressionFiles>
						<suppressionFile>${maven.multiModuleProjectDirectory}/suppression.xml</suppressionFile>
					</suppressionFiles>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.basepom.maven</groupId>
				<artifactId>duplicate-finder-maven-plugin</artifactId>
				<version>1.5.1</version>
				<configuration>
					<printEqualFiles>false</printEqualFiles>
					<failBuildInCaseOfDifferentContentConflict>true</failBuildInCaseOfDifferentContentConflict>
					<failBuildInCaseOfEqualContentConflict>false</failBuildInCaseOfEqualContentConflict>
					<failBuildInCaseOfConflict>false</failBuildInCaseOfConflict>
					<checkCompileClasspath>false</checkCompileClasspath>
					<checkRuntimeClasspath>true</checkRuntimeClasspath>
					<checkTestClasspath>false</checkTestClasspath>
					<skip>false</skip>
					<quiet>false</quiet>
					<preferLocal>false</preferLocal>
					<useResultFile>true</useResultFile>
					<resultFileMinClasspathCount>2</resultFileMinClasspathCount>
					<resultFile>${project.build.directory}/duplicate-finder-result.xml</resultFile>

					<useDefaultResourceIgnoreList>true</useDefaultResourceIgnoreList>
					<ignoredClassPatterns>
						<ignoredClassPattern>^io\.grpc\..*$</ignoredClassPattern>
					</ignoredClassPatterns>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.simplify4u.plugins</groupId>
				<artifactId>pgpverify-maven-plugin</artifactId>
				<version>1.16.0</version>
				<configuration>
					<keysMapLocations>
						<keysMapLocation>${maven.multiModuleProjectDirectory}/pgp-keys-map.list</keysMapLocation>
					</keysMapLocations>
					<quiet>true</quiet>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.owasp</groupId>
				<artifactId>dependency-check-maven</artifactId>
				<version>7.1.1</version>
			</plugin>
		</plugins>
	</reporting>
</project>
