<?xml version="1.0" encoding="UTF-8"?>
<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>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>closedsource-pom</artifactId>
        <version>5.0.14</version>
    </parent>

    <groupId>com.atlassian.confluence.plugins</groupId>
    <artifactId>confluence-notifications-project</artifactId>
    <version>8.10.0</version>
    <packaging>pom</packaging>

    <name>Confluence Notifications Project</name>
    <licenses>
        <license>
            <name>Atlassian 3.0 End User License Agreement</name>
            <url>http://www.atlassian.com/end-user-agreement/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <modules>
        <module>confluence-notifications-api-parent</module>
        <module>confluence-notifications-plugins-parent</module>
    </modules>

    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/confluence-notifications.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/confluence-notifications.git</developerConnection>
        <url>https://stash.atlassian.com/projects/confserver/repos/confluence-notifications</url>
        <tag>confluence-notifications-project-8.10.0</tag>
    </scm>

    <properties>
        <it.skip.tests>true</it.skip.tests>

        <javax.mail.version>1.4.5</javax.mail.version>
        <confluence.version>6.7.0-m51</confluence.version>
        <confluence.data.version>${confluence.version}</confluence.data.version>
        <!-- keep in sync with spring scanner version in Confluence -->
        <atlassian.spring.scanner.version>2.0.1</atlassian.spring.scanner.version>
        <analytics.version>4.2.3</analytics.version>
        <notifications.version>3.3.2</notifications.version>
        <jsoup.version>1.8.2</jsoup.version>
        <powermock.version>1.6.6</powermock.version>
        <atlassian.ao.version>1.2.2</atlassian.ao.version>

        <confluence-mentions.version>2.1.4</confluence-mentions.version>
        <inline-tasks.version>7.1.2</inline-tasks.version>
        <atlassian.webdriver.version>2.5.0</atlassian.webdriver.version>
        <testng.version>5.9</testng.version>
        <healthcheck.version>3.0.1</healthcheck.version>
        <greenmail.version>1.5.2</greenmail.version>
        <amps.version>6.1.7</amps.version>
        <functest.plugin.version>0.9.0</functest.plugin.version>
        <file-notifications.version>1.1.18</file-notifications.version>
        <email-tracker.version>1.3</email-tracker.version>
        <atlassian.jwt.version>1.4.1</atlassian.jwt.version>
        <confluence-feature-discovery-plugin.version>1.10.7
        </confluence-feature-discovery-plugin.version>

        <project.root.directory>${project.basedir}</project.root.directory>
        <plugin.parent.directory>${project.root.directory}/confluence-notifications-plugins-parent
        </plugin.parent.directory>
        <test.plugin.parent.directory>
            ${project.root.directory}/confluence-notifications-tests-parent
        </test.plugin.parent.directory>
        <plugin.resource.directories>
            ${plugin.parent.directory}/confluence-email-notifications-plugin/src/main/resources,
            ${plugin.parent.directory}/confluence-content-notifications-plugin/src/main/resources,
            ${plugin.parent.directory}/confluence-notifications-spi-plugin/src/main/resources,
            ${test.plugin.parent.directory}/confluence-email-integration-tests/src/main/resources,
            ${test.plugin.parent.directory}/confluence-email-notifications-test-plugin/src/main/resources
        </plugin.resource.directories>
        <plugin.root.directories>
            ${plugin.parent.directory}/confluence-email-notifications-plugin,
            ${plugin.parent.directory}/confluence-content-notifications-plugin,
            ${plugin.parent.directory}/confluence-notifications-spi-plugin,
            ${test.plugin.parent.directory}/confluence-email-integration-tests,
            ${test.plugin.parent.directory}/confluence-email-notifications-test-plugin
        </plugin.root.directories>
        <atlassian.darkfeature.sync.event>false</atlassian.darkfeature.sync.event>
        <api.enabled>true</api.enabled>
        <batching.enabled>false</batching.enabled>

        <notifications.queue.max.size>1000</notifications.queue.max.size>
        <notifications.max.resend.count>3</notifications.max.resend.count>
        <notifications.sender.thread.count>3</notifications.sender.thread.count>
        <notifications.delay.per.failure>10</notifications.delay.per.failure>
        <atlassian.dev.mode>false</atlassian.dev.mode>
        <acceptance.tests.skip>true</acceptance.tests.skip>
        <litmus.tests.skip>true</litmus.tests.skip>
        <confluence.fastdev>true</confluence.fastdev>
        <confluence.devtoolbox>true</confluence.devtoolbox>
        <confluence.fastdev>${atlassian.dev.mode}</confluence.fastdev>
        <confluence.devtoolbox>${atlassian.dev.mode}</confluence.devtoolbox>

        <webdriver.browser>chrome</webdriver.browser>
        <xvfb.enable>false</xvfb.enable>
        <confluence.containerid>tomcat8x</confluence.containerid>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-plugins-platform-pom</artifactId>
                <version>${confluence.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-notifications-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-content-notifications-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-content-notifications-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-email-notifications-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-notifications-batch-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-notifications-common-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-notifications-batch-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-feature-discovery-plugin</artifactId>
                <version>${confluence-feature-discovery-plugin.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-lookandfeel</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.selenium</groupId>
                <artifactId>atlassian-visual-comparison</artifactId>
                <!--todo: use some way of pulling in this instead of putting it here, so that it is
                sync'ed with webdriver-core-->
                <version>${atlassian.webdriver.version}</version>
            </dependency>

            <dependency>
                <groupId>com.atlassian.confluence.rest</groupId>
                <artifactId>confluence-rest-plugin</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-test-support</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-not-shippable</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-testutils</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-notifications-spi-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Dependencies for testing-->
            <dependency>
                <groupId>com.atlassian.activeobjects</groupId>
                <artifactId>activeobjects-test</artifactId>
                <version>${atlassian.ao.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-functestrpc-plugin</artifactId>
                <!-- When updating this be sure to update AbstractConfluenceAcceptanceTest.java too -->
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-webdriver-support</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.selenium</groupId>
                <artifactId>atlassian-webdriver-core</artifactId>
                <version>${atlassian.webdriver.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.collections</groupId>
                        <artifactId>google-collections</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.atlassian.util.concurrent</groupId>
                        <artifactId>atlassian-util-concurrent</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20070829</version>
            </dependency>
            <dependency>
                <groupId>com.icegreen</groupId>
                <artifactId>greenmail</artifactId>
                <version>${greenmail.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jsoup</groupId>
                <artifactId>jsoup</artifactId>
                <version>${jsoup.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugin.notifications</groupId>
                <artifactId>notifications-api</artifactId>
                <version>${notifications.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugin.notifications</groupId>
                <artifactId>notifications-api-default-impl</artifactId>
                <version>${notifications.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugin.notifications</groupId>
                <artifactId>notifications-module</artifactId>
                <version>${notifications.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.functest</groupId>
                <artifactId>functest-plugin</artifactId>
                <version>${functest.plugin.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>jsr311-api</artifactId>
                <version>1.1.1</version>
            </dependency>
            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-api-mockito</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.powermock</groupId>
                <artifactId>powermock-module-junit4</artifactId>
                <version>${powermock.version}</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-confluence-plugin</artifactId>
                    <version>${amps.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <containerId>${confluence.containerid}</containerId>
                        <systemPropertyVariables combine.children="append">
                            <!-- Dark features -->
                            <atlassian.darkfeature.notification.plugin.api.enabled.profile.settings.page>
                                ${api.enabled}
                            </atlassian.darkfeature.notification.plugin.api.enabled.profile.settings.page>
                            <atlassian.darkfeature.notification.plugin.api.enabled.admin.settings.page>
                                ${api.enabled}
                            </atlassian.darkfeature.notification.plugin.api.enabled.admin.settings.page>
                            <atlassian.darkfeature.hipchat.integration.system-user.enabled>
                                ${api.enabled}
                            </atlassian.darkfeature.hipchat.integration.system-user.enabled>
                            <atlassian.darkfeature.notification.plugin.api.enabled.com.atlassian.confluence.plugins.hipchat.api.events.HipChatUserMapped>
                                ${api.enabled}
                            </atlassian.darkfeature.notification.plugin.api.enabled.com.atlassian.confluence.plugins.hipchat.api.events.HipChatUserMapped>

                            <atlassian.darkfeature.notification.batch>${batching.enabled}
                            </atlassian.darkfeature.notification.batch>
                            <atlassian.darkfeature.site-wide.synchrony>false
                            </atlassian.darkfeature.site-wide.synchrony>
                            <atlassian.darkfeature.site-wide.synchrony.disable>true
                            </atlassian.darkfeature.site-wide.synchrony.disable>
                            <atlassian.darkfeature.site-wide.shared-drafts>false
                            </atlassian.darkfeature.site-wide.shared-drafts>
                            <atlassian.darkfeature.site-wide.shared-drafts.disable>true
                            </atlassian.darkfeature.site-wide.shared-drafts.disable>

                            <!-- CONFDEV-48019 -->
                            <atlassian.darkfeature.notification.plugin.api.enabled.com.atlassian.confluence.event.events.content.page.PageCreateEvent>
                                true
                            </atlassian.darkfeature.notification.plugin.api.enabled.com.atlassian.confluence.event.events.content.page.PageCreateEvent>
                            <atlassian.darkfeature.notification.plugin.api.enabled.com.atlassian.confluence.event.events.content.page.PageUpdateEvent>
                                true
                            </atlassian.darkfeature.notification.plugin.api.enabled.com.atlassian.confluence.event.events.content.page.PageUpdateEvent>
                            <atlassian.darkfeature.notification.plugin.api.enabled.com.atlassian.confluence.event.events.content.page.PageMoveEvent>
                                true
                            </atlassian.darkfeature.notification.plugin.api.enabled.com.atlassian.confluence.event.events.content.page.PageMoveEvent>

                            <!--Properties to make testing easier in confluence-->
                            <debug.email.border>true</debug.email.border>
                            <confluence.velocity.deprecation.strictmode>false
                            </confluence.velocity.deprecation.strictmode>
                            <javax.activation.debug>false</javax.activation.debug>
                            <notifications.max.resend.count>${notifications.max.resend.count}
                            </notifications.max.resend.count>
                            <notifications.queue.max.size>${notifications.queue.max.size}
                            </notifications.queue.max.size>
                            <notifications.sender.thread.count>
                                ${notifications.sender.thread.count}
                            </notifications.sender.thread.count>
                            <notifications.delay.per.failure>${notifications.delay.per.failure}
                            </notifications.delay.per.failure>
                            <atlassian.dev.mode>${atlassian.dev.mode}</atlassian.dev.mode>
                            <atlassian.mail.senddisabled>false</atlassian.mail.senddisabled>
                            <webdriver.browser>${webdriver.browser}</webdriver.browser>
                        </systemPropertyVariables>
                        <skipITs>${it.skip.tests}</skipITs>
                        <server>localhost</server>
                        <enableFastdev>${confluence.fastdev}</enableFastdev>
                        <enableDevToolbox>${confluence.devtoolbox}</enableDevToolbox>
                        <fastdevVersion>2.4</fastdevVersion>
                        <devToolboxVersion>2.0.15</devToolboxVersion>
                        <productVersion>${confluence.version}</productVersion>
                        <productDataVersion>${confluence.data.version}</productDataVersion>
                        <allowGoogleTracking>false</allowGoogleTracking>
                        <forceUpdateCheck>false</forceUpdateCheck>
                        <!--<jvmArgs>-XX:+UseG1GC -XX:+UseStringDeduplication -XX:+PrintStringDeduplicationStatistics</jvmArgs>-->
                        <bundledArtifacts combine.children="append">
                            <bundledArtifact>
                                <groupId>com.atlassian.plugin.notifications</groupId>
                                <artifactId>notifications-module</artifactId>
                                <version>${notifications.version}</version>
                            </bundledArtifact>
                            <bundledArtifact>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>confluence-notifications-spi-plugin</artifactId>
                                <version>${project.version}</version>
                                <type>jar</type>
                            </bundledArtifact>
                            <bundledArtifact>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>confluence-content-notifications-plugin</artifactId>
                                <version>${project.version}</version>
                            </bundledArtifact>
                            <bundledArtifact>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>confluence-email-notifications-plugin</artifactId>
                                <version>${project.version}</version>
                            </bundledArtifact>
                            <bundledArtifact>
                                <groupId>com.atlassian.confluence.plugins</groupId>
                                <artifactId>confluence-email-tracker</artifactId>
                                <version>${email-tracker.version}</version>
                            </bundledArtifact>
                            <bundledArtifact>
                                <groupId>com.atlassian.confluence.plugins</groupId>
                                <artifactId>confluence-file-notifications</artifactId>
                                <version>${file-notifications.version}</version>
                            </bundledArtifact>
                            <bundledArtifact>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>confluence-notifications-batch-plugin</artifactId>
                                <version>${project.version}</version>
                            </bundledArtifact>
                        </bundledArtifacts>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>ban-milestones-and-release-candidates</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <banVersionDeps>
                                        <excludes>
                                            <!-- Host product and tests can use milestones and release candidates -->
                                            <exclude>com.atlassian.confluence</exclude>
                                            <exclude>com.atlassian.confluence.*</exclude>
                                            <exclude>com.atlassian.plugin.notifications
                                            </exclude><!-- TODO remove when releasing with non-milestone -->
                                            <exclude>com.atlassian.plugin.notifications.*
                                            </exclude><!-- TODO remove when releasing with non-milestone -->
                                            <exclude>com.atlassian.selenium</exclude>
                                        </excludes>
                                    </banVersionDeps>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.plugin</groupId>
                    <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
                    <version>${atlassian.spring.scanner.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>tests</id>
            <activation>
                <property>
                    <name>!maven.test.skip</name>
                </property>
            </activation>
            <modules>
                <module>confluence-notifications-tests-parent</module>
            </modules>
        </profile>
        <profile>
            <id>legacy</id>
            <properties>
                <api.enabled>false</api.enabled>
            </properties>
        </profile>
        <profile>
            <id>acceptance-tests</id>
            <properties>
                <it.skip.tests>false</it.skip.tests>
                <atlassian.dev.mode>false</atlassian.dev.mode>
                <confluence.fastdev>false</confluence.fastdev>
                <confluence.devtoolbox>false</confluence.devtoolbox>
            </properties>
        </profile>
        <profile>
            <id>system-user-disabled-tests</id>
            <properties>
                <it.skip.tests>false</it.skip.tests>
                <atlassian.dev.mode>false</atlassian.dev.mode>
                <confluence.fastdev>false</confluence.fastdev>
                <confluence.devtoolbox>false</confluence.devtoolbox>
            </properties>
        </profile>
    </profiles>
</project>
