<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (C) 2019 eXo Platform SAS.
    
    This 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 2.1 of
    the License, or (at your option) any later version.
    
    This software 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 software; if not, write to the Free
    Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
    02110-1301 USA, or see the FSF site: http://www.fsf.org.

-->
<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>
    <artifactId>addons-exo-parent-pom</artifactId>
    <groupId>org.exoplatform.addons</groupId>
    <version>20-M02</version>
  </parent>

  <artifactId>exo-onlyoffice-editor-parent</artifactId>
  <groupId>org.exoplatform.addons.onlyoffice</groupId>
  <version>7.2.0-M18</version>
  <packaging>pom</packaging>
  <name>eXo Add-on:: OnlyOffice Editor</name>
  <description>eXo OnlyOffice Editor for Documents extension</description>

  <scm>
    <connection>scm:git:git://github.com/exoplatform/onlyoffice.git</connection>
    <developerConnection>scm:git:git@github.com:exoplatform/onlyoffice.git</developerConnection>
    <tag>7.2.0-M18</tag>
    <url>https://github.com/exoplatform/onlyoffice</url>
  </scm>

  <properties>
    <!-- eXo Modules -->
    <addon.exo.ecms.version>7.2.0-M18</addon.exo.ecms.version>
  
    <!-- Sonar properties -->
    <sonar.organization>exoplatform</sonar.organization>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.exoplatform.ecms</groupId>
        <artifactId>ecms</artifactId>
        <version>${addon.exo.ecms.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <!-- Onlyoffice extension -->
      <dependency>
        <groupId>org.exoplatform.addons.onlyoffice</groupId>
        <artifactId>exo-onlyoffice-editor-services</artifactId>
        <version>${project.version}</version>
        <type>jar</type>
      </dependency>
      <dependency>
        <groupId>org.exoplatform.addons.onlyoffice</groupId>
        <artifactId>exo-onlyoffice-editor-webapp</artifactId>
        <version>${project.version}</version>
        <type>war</type>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <modules>
    <module>services</module>
    <module>webapp</module>
    <module>packaging</module>
  </modules>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <systemPropertyVariables>
              <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.org.exoplatform>debug</org.apache.commons.logging.simplelog.log.org.exoplatform>
              <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>
              <maven.exoplatform.dir>${project.build.directory}</maven.exoplatform.dir>
              <gatein.test.tmp.dir>${project.build.directory}</gatein.test.tmp.dir>
              <java.util.logging.config.class>org.exoplatform.component.test.logging.LogConfigurator</java.util.logging.config.class>
              <com.arjuna.ats.arjuna.objectstore.objectStoreDir>${project.build.directory}</com.arjuna.ats.arjuna.objectstore.objectStoreDir>
              <exo.profiles>hsqldb</exo.profiles>
            </systemPropertyVariables>
            <systemProperties>
              <property>
                <name>gatein.test.output.path</name>
                <value>${project.build.directory}</value>
              </property>
            </systemProperties>
          </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>
