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

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <artifactId>maven-parent-pom</artifactId>
    <groupId>io.meeds</groupId>
    <version>29-M02</version>
  </parent>

  <groupId>io.meeds.portal</groupId>
  <artifactId>portal.parent</artifactId>
  <version>7.2.x-devx-SNAPSHOT</version>
  <packaging>pom</packaging>

  <name>Meeds - Portal</name>

  <properties>
    <io.meeds.gatein.sso.version>7.2.x-devx-SNAPSHOT</io.meeds.gatein.sso.version>
    <io.meeds.gatein.pc.version>7.2.x-devx-SNAPSHOT</io.meeds.gatein.pc.version>
    
    <!-- Sonar properties -->
    <sonar.organization>meeds-io</sonar.organization>
    
  </properties>

  <scm>
    <connection>scm:git:git://github.com/meeds-io/portal.git</connection>
    <developerConnection>scm:git:git@github.com:meeds-io/portal.git</developerConnection>
    <url>https://github.com/meeds-io/portal</url>
    <tag>HEAD</tag>
  </scm>

  <modules>
    <module>component</module>
    <module>webui</module>
    <module>web</module>
  </modules>

  <dependencyManagement>
    <dependencies>
      <!-- GateIn-PC dependencies -->
      <dependency>
        <groupId>io.meeds.gatein.pc</groupId>
        <artifactId>pc-parent</artifactId>
        <version>${io.meeds.gatein.pc.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- GateIn-SSO dependencies -->
      <dependency>
        <groupId>io.meeds.gatein.sso</groupId>
        <artifactId>sso-parent</artifactId>
        <version>${io.meeds.gatein.sso.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      
      <!-- Internal project artifacts -->
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.parent</artifactId>
        <version>${project.version}</version>
        <classifier>source-release</classifier>
        <type>zip</type>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.web</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.test.core</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.test.web</artifactId>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.web</artifactId>
        <version>${project.version}</version>
        <type>pom</type>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.api</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.api</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.common</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.common</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.file-storage</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.file-storage</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.resources</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.resources</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.identity</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.identity</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.pc</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.pc</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.portal</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.portal</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.scripting</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.scripting</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.web.controller</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.web.controller</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.web.security</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.web.security</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.web.resources</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.web.resources</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.management</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.component.management</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.webui.portal</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.webui.portal</artifactId>
        <type>test-jar</type>
        <version>${project.version}</version>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.web.portal</artifactId>
        <version>${project.version}</version>
        <type>war</type>
      </dependency>

      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>portal.web.rest</artifactId>
        <version>${project.version}</version>
        <type>war</type>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <finalName>${project.artifactId}</finalName>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <runOrder>alphabetical</runOrder>
            <systemPropertyVariables>
              <gatein.test.output.path>${project.build.directory}</gatein.test.output.path>
              <org.apache.commons.logging.Log>org.apache.commons.logging.impl.SimpleLog</org.apache.commons.logging.Log>
              <org.apache.commons.logging.simplelog.defaultlog>info</org.apache.commons.logging.simplelog.defaultlog>
              <org.apache.commons.logging.simplelog.log.net.hibernate>warn</org.apache.commons.logging.simplelog.log.net.hibernate>
              <java.naming.factory.initial>org.exoplatform.services.naming.SimpleContextFactory</java.naming.factory.initial>
              <!-- Mandatory for testing -->
              <exo.profiles>test</exo.profiles>
            </systemPropertyVariables>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <configuration>
            <!-- Don't include libraries into Web Archives -->
            <packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <!-- This profile is used to allow github action to build branches. The github action is used for sonar analysis -->
  <profiles>
    <profile>
      <id>project-repositories</id>
      <activation>
        <property>
          <name>!skip-project-repositories</name>
        </property>
      </activation>
      <repositories>
        <repository>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>repository.exoplatform.org</id>
          <url>https://repository.exoplatform.org/public</url>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <id>repository.exoplatform.org</id>
          <url>https://repository.exoplatform.org/public</url>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
</project>
