<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>io.telicent.smart-caches.entity-resolution</groupId>
        <artifactId>parent</artifactId>
        <version>0.6.2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>cli-canonical-index</artifactId>
    <name>Telicent Smart Caches - Entity Resolution - Canonical Indexer CLI</name>

    <properties>
        <license.header.path>${project.parent.basedir}</license.header.path>
        <coverage.minimum>0.3</coverage.minimum>
    </properties>

    <dependencies>

    <!--Internal -->
    <!--SC ER -->
        <dependency>
            <groupId>io.telicent.smart-caches.entity-resolution</groupId>
            <artifactId>entity-collector</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches.entity-resolution</groupId>
            <artifactId>entity-resolver-elastic</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches.entity-resolution</groupId>
            <artifactId>entity-resolver-api</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches.entity-resolution</groupId>
            <artifactId>ies-entity-resolver-configuration</artifactId>
            <version>${project.version}</version>
        </dependency>

    <!--SC Core -->
        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>cli-core</artifactId>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>configurator</artifactId>
            <version>${dependency.smart-caches}</version>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>event-sources-core</artifactId>
            <version>${dependency.smart-caches}</version>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>event-source-file</artifactId>
            <version>${dependency.smart-caches}</version>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>event-source-kafka</artifactId>
            <version>${dependency.smart-caches}</version>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>live-reporter</artifactId>
            <version>${dependency.smart-caches}</version>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>observability-core</artifactId>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>projectors-core</artifactId>
        </dependency>

    <!--External -->

    <!-- JENA-->
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-arq</artifactId>
            <version>${dependency.jena}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-rdfpatch</artifactId>
            <version>${dependency.jena}</version>
        </dependency>

    <!-- OTHER -->
        <dependency>
            <groupId>com.github.rvesse</groupId>
            <artifactId>airline</artifactId>
            <version>${dependency.airline}</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${dependency.jackson}</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${dependency.jackson}</version>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${dependency.jackson}</version>
        </dependency>

        <dependency>
            <groupId>io.opentelemetry.javaagent</groupId>
            <artifactId>opentelemetry-javaagent</artifactId>
            <version>${dependency.opentelemetry.agent}</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
            <version>${dependency.commons-collections}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${dependency.commons-lang}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>${dependency.httpcore}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka-clients</artifactId>
            <version>${dependency.kafka}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${dependency.slf4j}</version>
        </dependency>

    <!-- Test Dependencies -->
    <!-- Internal -->
    <!-- SC ER -->
        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>cli-core</artifactId>
            <version>${dependency.smart-caches}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches.entity-resolution</groupId>
            <artifactId>entity-resolver-elastic</artifactId>
            <version>${project.version}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.telicent.smart-caches.entity-resolution</groupId>
            <artifactId>test-clusters</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>

    <!-- SC Core -->
        <dependency>
            <groupId>io.telicent.smart-caches</groupId>
            <artifactId>event-source-kafka</artifactId>
            <version>${dependency.smart-caches}</version>
            <classifier>tests</classifier>
            <scope>test</scope>
        </dependency>

    <!-- External -->
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>24.1.0</version>
            <scope>test</scope>
        </dependency>

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

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

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${plugin.clean}</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>lib/</directory>
                            <followSymlinks>false</followSymlinks>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${plugin.dependency}</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.basedir}/lib</outputDirectory>
                            <includeTypes>jar</includeTypes>
                            <includeScope>runtime</includeScope>
                            <excludeGroupIds>io.opentelemetry.javaagent</excludeGroupIds>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-agents</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.basedir}/agents</outputDirectory>
                            <includeTypes>jar</includeTypes>
                            <includeScope>runtime</includeScope>
                            <includeGroupIds>io.opentelemetry.javaagent</includeGroupIds>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${plugin.surefire}</version>
                <configuration>
                    <includes>
                        <include>**/Test*.java</include>
                    </includes>

                    <reuseForks>true</reuseForks>
                    <trimStackTrace>true</trimStackTrace>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>docker</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <build>
                <plugins>
          <!-- When we work on #47 uncomment this, so we can verify that we have reached sufficient coverage -->
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${plugin.jacoco}</version>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${plugin.surefire}</version>
                        <configuration>
                            <includes>
                                <include>**/Test*.java</include>
                                <include>**/DockerTest*.java</include>
                            </includes>

                            <reuseForks>true</reuseForks>
                            <trimStackTrace>true</trimStackTrace>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
