<?xml version="1.0" encoding="UTF-8"?>
<!--
  This file is part of the Meeds project (https://meeds.io/).

  Copyright (C) 2020 - 2024 Meeds Association contact@meeds.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, write to the Free Software Foundation,
  Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-->
<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.meeds.analytics</groupId>
    <artifactId>analytics-parent</artifactId>
    <version>7.3.0-M15</version>
  </parent>
  <artifactId>analytics-services</artifactId>
  <name>Meeds:: Analytics - Services</name>
  <properties>
    <exo.test.coverage.ratio>0</exo.test.coverage.ratio>
    <org.elasticsearch.version>5.6.11</org.elasticsearch.version>
    <!--
      The *IT classes run the storage's hand-written Elasticsearch requests
      against a real engine, under the parent's run-its profile only:
        mvn verify -Prun-its                      (Testcontainers engine)
        mvn verify -Prun-its -Des.url=http://127.0.0.1:9200   (an engine you already have;
                                                  the suite uses its own it_analytics* names)
      Off in a plain build, like ai-rag's, and for the same reason: a green
      surefire run does not mean these requests ran (backend-spring.md §7).
      Versions declared here as in ai-rag; this is the second module needing
      them, which is the point where maven-depmgt-pom should carry them.
    -->
    <org.testcontainers.version>1.21.4</org.testcontainers.version>
    <es.testcontainer.image>docker.elastic.co/elasticsearch/elasticsearch:9.3.4</es.testcontainer.image>
  </properties>
  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>analytics-api</artifactId>
    </dependency>

    <dependency>
      <groupId>io.meeds.social</groupId>
      <artifactId>social-component-core</artifactId>
    </dependency>

    <dependency>
      <groupId>io.meeds.auth-server</groupId>
      <artifactId>auth-server-service</artifactId>
    </dependency>

    <!-- Test -->
    <dependency>
      <groupId>io.meeds.social</groupId>
      <artifactId>social-component-core</artifactId>
      <scope>test</scope>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-junit-jupiter</artifactId>
      <scope>test</scope>
    </dependency>

    <!-- Runs the hand-written Elasticsearch requests against a real engine (*IT, run-its profile) -->
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>elasticsearch</artifactId>
      <version>${org.testcontainers.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.testcontainers</groupId>
      <artifactId>junit-jupiter</artifactId>
      <version>${org.testcontainers.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <systemPropertyVariables>
            <es.testcontainer.image>${es.testcontainer.image}</es.testcontainer.image>
          </systemPropertyVariables>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
