<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <artifactId>news</artifactId>
    <groupId>org.exoplatform.addons.news</groupId>
    <version>2.4.0-RC03</version>
  </parent>
  <artifactId>news-services</artifactId>
  <packaging>jar</packaging>
  <name>eXo Add-on:: News Services</name>
  <description>News Services</description>

  <properties>
    <rest.api.doc.title>News Rest APIs</rest.api.doc.title>
    <rest.api.doc.version>1.0</rest.api.doc.version>
    <rest.api.doc.description>News addon used Rest endpoints</rest.api.doc.description>

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

  <dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.commons</groupId>
      <artifactId>commons-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.social</groupId>
      <artifactId>social-component-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.addons.analytics</groupId>
      <artifactId>analytics-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.social</groupId>
      <artifactId>social-component-webui</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.social</groupId>
      <artifactId>social-component-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>ecms-core-services</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.ecms</groupId>
      <artifactId>ecms-social-integration</artifactId>
    </dependency>
    <dependency>
      <groupId>io.swagger.core.v3</groupId>
      <artifactId>swagger-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.commons</groupId>
      <artifactId>commons-testing</artifactId>
    </dependency>
    <dependency>
      <groupId>org.exoplatform.gatein.portal</groupId>
      <artifactId>exo.portal.component.identity</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-api-mockito2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.powermock</groupId>
      <artifactId>powermock-module-junit4</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>@{argLine} ${env.MAVEN_OPTS} --add-opens=java.base/java.security=ALL-UNNAMED   --add-opens=java.base/jdk.internal.loader=ALL-UNNAMED  --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED  --add-opens=java.base/java.util.regex=ALL-UNNAMED   --add-opens=java.base/java.lang=ALL-UNNAMED  --add-opens=java.base/java.util.concurrent=ALL-UNNAMED </argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-sources</phase>
            <goals>
              <goal>delombok</goal>
            </goals>
            <configuration>
              <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
              <addOutputDirectory>false</addOutputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.openapitools.swagger</groupId>
        <artifactId>swagger-maven-plugin</artifactId>
        <configuration>
          <useResourcePackagesChildren>true</useResourcePackagesChildren>
          <resourcePackages>
            <locations>org.exoplatform.news.rest</locations>
          </resourcePackages>
          <swaggerConfig>
            <info>
              <title>${rest.api.doc.title}</title>
              <version>${rest.api.doc.version}</version>
              <description>${rest.api.doc.description}</description>
              <license>
                <url>https://www.gnu.org/licenses/agpl-3.0.en.html</url>
                <name>AGPL</name>
              </license>
            </info>
          </swaggerConfig>
        </configuration>
      </plugin>
      <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.net.hibernate>warn</org.apache.commons.logging.simplelog.log.net.hibernate>
            <java.naming.factory.initial>org.exoplatform.services.naming.SimpleContextFactory</java.naming.factory.initial>
            <java.util.logging.config.class>org.exoplatform.services.log.impl.SimpleExoLogConfigurator</java.util.logging.config.class>
            <exo.profiles>hsqldb</exo.profiles>
            <com.arjuna.ats.arjuna.objectstore.objectStoreDir>${project.build.directory}</com.arjuna.ats.arjuna.objectstore.objectStoreDir>
            <ObjectStoreEnvironmentBean.objectStoreDir>${project.build.directory}</ObjectStoreEnvironmentBean.objectStoreDir>
            <gatein.test.tmp.dir>${project.build.directory}</gatein.test.tmp.dir>
            <gatein.test.output.path>${project.build.directory}</gatein.test.output.path>
            <exo.files.storage.dir>${project.build.directory}</exo.files.storage.dir>
            <gatein.email.domain.url>http://localhost:8080/</gatein.email.domain.url>
          </systemPropertyVariables>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
