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

 Copyright (C) 2020 - 2025 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">
  <parent>
    <groupId>io.meeds.portal</groupId>
    <artifactId>portal.component</artifactId>
    <version>7.2.0-exo-M30</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>portal.component.api</artifactId>
  <packaging>jar</packaging>
  <name>Meeds Portal Component API</name>

  <properties>
    <exo.test.coverage.ratio>0.01</exo.test.coverage.ratio>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.meeds.kernel</groupId>
      <artifactId>exo.kernel.component.common</artifactId>
      <exclusions>
        <exclusion>
          <!-- To be fixed in the original project -->
          <artifactId>commons-logging</artifactId>
          <groupId>commons-logging</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jmock</artifactId>
          <groupId>jmock</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>io.meeds.kernel</groupId>
      <artifactId>exo.kernel.container</artifactId>
    </dependency>
    <dependency>
      <groupId>io.meeds.kernel</groupId>
      <artifactId>exo.kernel.component.cache</artifactId>
    </dependency>
    <dependency>
      <groupId>io.meeds.core</groupId>
      <artifactId>exo.core.component.organization.api</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.ogce</groupId>
          <artifactId>xpp3</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>io.meeds.ws</groupId>
      <artifactId>exo.ws.commons</artifactId>
    </dependency>
    <dependency>
      <groupId>io.meeds.ws</groupId>
      <artifactId>exo.ws.frameworks.json</artifactId>
    </dependency>
    <dependency>
      <groupId>io.meeds.ws</groupId>
      <artifactId>exo.ws.rest.core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.meeds.ws</groupId>
      <artifactId>exo.ws.rest.ext</artifactId>
    </dependency>

    <!-- io.meeds.gatein.wci dependencies -->
    <dependency>
      <groupId>io.meeds.gatein.wci</groupId>
      <artifactId>wci-wci</artifactId>
    </dependency>

    <!-- io.meeds.gatein.pc dependencies -->
    <dependency>
      <groupId>io.meeds.gatein.pc</groupId>
      <artifactId>pc-api</artifactId>
    </dependency>
    <dependency>
      <groupId>io.meeds.gatein.pc</groupId>
      <artifactId>pc-portlet</artifactId>
    </dependency>
    <dependency>
      <groupId>io.meeds.gatein.pc</groupId>
      <artifactId>pc-federation</artifactId>
    </dependency>

    <!-- org.gatein general API dependencies -->
    <dependency>
      <groupId>org.gatein.api</groupId>
      <artifactId>gatein-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.gatein.common</groupId>
      <artifactId>common-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.gatein.mop</groupId>
      <artifactId>mop-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.gatein.mop</groupId>
      <artifactId>mop-spi</artifactId>
    </dependency>

    <!-- Other Third Party libraries -->
    <dependency>
      <groupId>jakarta.servlet</groupId>
      <artifactId>jakarta.servlet-api</artifactId>
      <scope>compile</scope>
      <!--
        Attention: Avoid changing this to scope = provided here for transitive dependency.
        jakarta.servlet is already defined by Web Container (Tomcat Server), thus it will be removed from packaging modules
      -->
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>compile</scope>
      <!--
        Attention: Avoid changing this to scope = provided here for transitive dependency.
        lombok is used in compilation time only, thus it will be removed from packaging modules.
      -->
    </dependency>
    <!-- Swagger -->
    <dependency>
      <groupId>io.swagger.core.v3</groupId>
      <artifactId>swagger-annotations-jakarta</artifactId>
      <scope>compile</scope>
      <!--
        Attention: Avoid changing this to scope = provided here for transitive dependency.
        swagger is used in build time only, thus it will be removed from packaging modules.
      -->
    </dependency>
    <dependency>
      <groupId>javax.xml.bind</groupId>
      <artifactId>jaxb-api</artifactId>
      <exclusions>
        <exclusion>
          <groupId>javax.xml.stream</groupId>
          <artifactId>stax-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <!-- Will be used in Test scope only for deprecated Kernel IoC dependency -->
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
    </dependency>
    <dependency>
      <groupId>org.hibernate.orm</groupId>
      <artifactId>hibernate-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.liquibase</groupId>
      <artifactId>liquibase-core</artifactId>
    </dependency>
    <!-- Used to have Liquibase logging over logback -->
    <dependency>
      <groupId>com.mattbertolini</groupId>
      <artifactId>liquibase-slf4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.logging</groupId>
      <artifactId>jboss-logging</artifactId>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.json</groupId>
      <artifactId>json</artifactId>
    </dependency>
    <dependency>
      <groupId>org.staxnav</groupId>
      <artifactId>staxnav.core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk18on</artifactId>
    </dependency>
    <!-- Spring base artifacts -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-webflux</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context-support</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-messaging</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-hateoas</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.data</groupId>
      <artifactId>spring-data-elasticsearch</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-configuration-processor</artifactId>
      <optional>true</optional>
    </dependency>

    <!--
      Include log4j-api (without log4j-core which is NOT USED, to prevent https://www.slf4j.org/log4shell.html)
      in order to route LOGGING calls to LOGBACK.

      Read more here: https://spring.io/blog/2021/12/10/log4j2-vulnerability-and-spring-boot
      about 'log4j-to-slf4j' and 'log4j-api'
     -->
    <dependency>
      <groupId>org.apache.logging.log4j</groupId>
      <artifactId>log4j-to-slf4j</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <!-- Used to add BuildNumber in application.properties -->
    <resources>
      <resource>
        <directory>src/main/resources/</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.jibx</groupId>
        <artifactId>maven-jibx-plugin</artifactId>
        <configuration>
          <directory>src/main/resources</directory>
          <includes>
            <includes>binding.xml</includes>
          </includes>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>bind</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
