<?xml version="1.0" encoding="UTF-8"?>
<!--
 * See the NOTICE file distributed with this work for additional
 * information regarding copyright ownership.
 *
 * 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>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-notifications-test</artifactId>
    <version>10.5-rc-1</version>
  </parent>
  <artifactId>xwiki-platform-notifications-test-tests</artifactId>
  <name>XWiki Platform - Notifications - Test - Functional Tests</name>
  <properties>
    <!-- Override in order to add the notifications dependencies -->
    <xwikiCfgPlugins>\
      com.xpn.xwiki.plugin.skinx.JsSkinExtensionPlugin,\
      com.xpn.xwiki.plugin.skinx.JsSkinFileExtensionPlugin,\
      com.xpn.xwiki.plugin.skinx.CssSkinExtensionPlugin,\
      com.xpn.xwiki.plugin.skinx.CssSkinFileExtensionPlugin,\
      com.xpn.xwiki.plugin.skinx.LinkExtensionPlugin,\
      com.xpn.xwiki.plugin.activitystream.plugin.ActivityStreamPlugin,\
      com.xpn.xwiki.plugin.scheduler.SchedulerPlugin
    </xwikiCfgPlugins>
    <!-- Mapping needed by the ActivityStream migrator since AS is a dependency of the User Directory -->
    <!-- Mapping needed by the Mail Sender -->
    <xwikiDbHbmCommonExtraMappings>activitystream.hbm.xml,mailsender.hbm.xml</xwikiDbHbmCommonExtraMappings>
    <!-- TODO: Remove once https://jira.xwiki.org/browse/XWIKI-7581 is fixed -->
    <xwikiCfgSuperadminPassword>pass</xwikiCfgSuperadminPassword>
  </properties>
  <dependencies>
    <!-- The UI we are testing-->
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-notifications-ui</artifactId>
      <version>${project.version}</version>
      <type>xar</type>
      <scope>runtime</scope>
    </dependency>
    <!-- Needed to trigger the scheduler job -->
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-scheduler-ui</artifactId>
      <version>${project.version}</version>
      <type>xar</type>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-administration-ui</artifactId>
      <version>${project.version}</version>
      <type>xar</type>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-mail-ui</artifactId>
      <version>${project.version}</version>
      <type>xar</type>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-test-ui</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-notifications-test-pageobjects</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-mail-test-pageobjects</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-scheduler-test-pageobjects</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <!-- A wrapper to javax.mail much easier to use -->
    <dependency>
      <groupId>org.simplejavamail</groupId>
      <artifactId>simple-java-mail</artifactId>
      <version>4.4.5</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-user-profile-test-pageobjects</artifactId>
      <version>${project.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-activitystream-api</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-eventstream-default</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>org.xwiki.platform</groupId>
      <artifactId>xwiki-platform-mail-send-storage</artifactId>
      <version>${project.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>com.icegreen</groupId>
      <artifactId>greenmail</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
    <!-- Make sure we have the Logback SLF4J binding for client side logging for our tests and make sure other logging
         systems go through SLF4J -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>log4j-over-slf4j</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.xwiki.platform</groupId>
        <artifactId>xwiki-platform-tool-packager-plugin</artifactId>
        <version>${project.version}</version>
        <dependencies>
          <!-- TODO: remove the need for this dependency in the future. The reason we need it right now is because
               the Packager Mojo will use the Import Mojo to import XARs but since we've defined the
               xwikiDbHbmCommonExtraMappings property up there, it's using it and thus we need the mapping file to be
               in the classpath. -->
          <dependency>
            <groupId>org.xwiki.platform</groupId>
            <artifactId>xwiki-platform-activitystream-api</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>org.xwiki.platform</groupId>
            <artifactId>xwiki-platform-mail-send-storage</artifactId>
            <version>${project.version}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>package</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>clover</id>
      <!-- Add the Clover JAR to the WAR so that it's available at runtime when XWiki executes.
           It's needed because instrumented jars in the WAR will call Clover APIs at runtime when they execute. -->
      <dependencies>
        <dependency>
          <groupId>org.openclover</groupId>
          <artifactId>clover</artifactId>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <!-- Add the Clover JAR to the Packager plugin runtime classpath since the Packager plugin uses java classes
               that have been instrumented with Clover (XWiki oldcore for example) -->
          <plugin>
            <groupId>org.xwiki.platform</groupId>
            <artifactId>xwiki-platform-tool-packager-plugin</artifactId>
            <version>${project.version}</version>
            <dependencies>
              <dependency>
                <groupId>org.openclover</groupId>
                <artifactId>clover</artifactId>
                <version>${clover.version}</version>
              </dependency>
            </dependencies>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
