<?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/maven-v4_0_0.xsd">
  <parent>
    <groupId>io.meeds.portal</groupId>
    <artifactId>portal.component</artifactId>
    <version>7.2.x-mips-SNAPSHOT</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>portal.component.identity</artifactId>
  <packaging>jar</packaging>
  <name>Meeds Portal Component IDM</name>

  <properties>
    <sun-opends.version>1.0.0</sun-opends.version>
    <berkeleydb.version>3.2.76</berkeleydb.version>
    <exo.test.coverage.ratio>0.40</exo.test.coverage.ratio>
  </properties>

  <dependencies>
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>portal.component.common</artifactId>
    </dependency>

    <dependency>
      <groupId>org.picketlink.idm</groupId>
      <artifactId>picketlink-idm-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.picketlink.idm</groupId>
      <artifactId>picketlink-idm-spi</artifactId>
    </dependency>
    <dependency>
      <groupId>org.picketlink.idm</groupId>
      <artifactId>picketlink-idm-ldap</artifactId>
    </dependency>

    <!-- Test scope -->
    <dependency>
      <groupId>${project.groupId}</groupId>
      <artifactId>portal.component.common</artifactId>
      <type>test-jar</type>
      <!-- Test scope not added on purpose for transitive dependency -->
    </dependency>
    <dependency>
       <groupId>sun-opends</groupId>
       <artifactId>OpenDS</artifactId>
       <version>${sun-opends.version}</version>
       <scope>test</scope>
    </dependency>
    <dependency>
       <groupId>berkeleydb</groupId>
       <artifactId>je</artifactId>
       <version>${berkeleydb.version}</version>
       <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-configuration-processor</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>aspectj-maven-plugin</artifactId>
          <configuration>
            <aspectLibraries>
              <aspectLibrary>
                <groupId>${project.groupId}</groupId>
                <artifactId>portal.component.common</artifactId>
              </aspectLibrary>
            </aspectLibraries>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <forkMode>always</forkMode>
            <includes>
              <include>io/meeds/portal/identity/TestGroupAsMembership.java</include>
              <include>io/meeds/portal/identity/TestUserAutomaticDeactivation.java</include>
              <include>io/meeds/portal/identity/InheritedMembershipListenerTest.java</include>
              <include>org/exoplatform/services/tck/organization/Test*.java</include>
              <include>org/exoplatform/services/organization/Test*.java</include>
              <include>org/exoplatform/services/organization/externalstore/Test*.java</include>
              <include>org/exoplatform/services/organization/externalstore/jpa/Test*.java</include>
            </includes>
            <excludes>
              <exclude>**/Test*LDAP*.java</exclude>
              <exclude>org/exoplatform/services/organization/externalstore/*.java</exclude>
              <exclude>**/AbstractOrganizationServiceTest.java</exclude>
              <exclude>**/AbstractTestOrganizationService.java</exclude>
            </excludes>
            <systemPropertyVariables>
              <gatein.test.tmp.dir>${project.build.directory}/datadir</gatein.test.tmp.dir>
              <org.exoplatform.container.configuration.debug>true</org.exoplatform.container.configuration.debug>
              <orgservice.test.configuration.file>/conf/standalone/test-tck-configuration.xml</orgservice.test.configuration.file>
              <orgservice.test.configuration.skipDateTests>true</orgservice.test.configuration.skipDateTests>
              <orgservice.test.configuration.skipCISearchTests>true</orgservice.test.configuration.skipCISearchTests>
              <exo.jpa.datasource.name>java:/comp/env/exo-jpa_portal</exo.jpa.datasource.name>
            </systemPropertyVariables>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <configuration>
            <forkMode>always</forkMode>
            <includes>
              <include>**/Test*LDAP*.java</include>
              <include>org/exoplatform/services/organization/externalstore/*.java</include>
            </includes>
            <excludes>
              <exclude>*</exclude>
            </excludes>
            <systemPropertyVariables>
              <gatein.test.tmp.dir>${project.build.directory}/datadir</gatein.test.tmp.dir>
              <org.exoplatform.container.configuration.debug>true</org.exoplatform.container.configuration.debug>
              <orgservice.test.configuration.file>/conf/standalone/test-tck-configuration.xml</orgservice.test.configuration.file>
              <orgservice.test.configuration.skipDateTests>true</orgservice.test.configuration.skipDateTests>
              <orgservice.test.configuration.skipCISearchTests>true</orgservice.test.configuration.skipCISearchTests>
              <exo.jpa.datasource.name>java:/comp/env/exo-jpa_portal</exo.jpa.datasource.name>
            </systemPropertyVariables>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
</project>
