<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>closedsource-pom</artifactId>
        <version>5.0.23</version>
    </parent>

    <groupId>com.atlassian.integration.jira</groupId>
    <artifactId>jira-integration-parent</artifactId>
    <version>6.2.0</version>
    <name>Jira Integration</name>
    <packaging>pom</packaging>

    <modules>
        <module>api</module>
        <module>plugin</module>
        <module>page-objects</module>
        <module>spi</module>
    </modules>

    <properties>
        <source.encoding>UTF-8</source.encoding>

        <platform.version>5.0.0</platform.version>
        <amps.version>6.3.18</amps.version>
        <atl.sel.version>2.5.3</atl.sel.version>
        <issue-status-plugin.version>1.1.7</issue-status-plugin.version>
        <jaxb.version>2.3.0</jaxb.version>
        <profiling.version>1.9</profiling.version>

        <!-- These version should match the one defined in the platform pom -->
        <less.version>4.0.0</less.version>
        <ual.version>6.0.0</ual.version>

        <!-- Product versions -->
        <bamboo.version>4.4.0</bamboo.version>
        <confluence.version>5.9.14</confluence.version>
        <fecru.version>2.8.1-20120829051639</fecru.version>
        <jira.version>8.0.0</jira.version>
        <refapp.version>5.0.0</refapp.version>
        <bitbucket.version>6.0.0</bitbucket.version>
        <bitbucket.data.version>${bitbucket.version}</bitbucket.data.version>
        <bitbucket.osgi.version>6.0.0</bitbucket.osgi.version>

        <!-- Defines whether the UI tests should pop up Firefox (true = hide Firefox) -->
        <xvfb.enable>true</xvfb.enable>
        <firefox.profile>44.0-nofirebug</firefox.profile>
        <test.retry.count>3</test.retry.count>
        <dark.features.plugin.version>0.9.4</dark.features.plugin.version>

        <fe.node.installdir>.node</fe.node.installdir>
        <fe.node.version>v6.10.3</fe.node.version>
        <fe.npm.version>5.0.3</fe.npm.version>

        <quick.reload.version>3.0.0</quick.reload.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-amps-plugin</artifactId>
                    <version>${amps.version}</version>
                </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>
                                        <!-- TODO: Remove this when updating to a non-milestone release of 4.0.0 -->
                                        <excludes>
                                            <exclude>com.atlassian.bitbucket.server:*</exclude>
                                        </excludes>
                                    </banVersionDeps>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <excludePackageNames>com.atlassian.internal.integration.jira.rest</excludePackageNames>
                        <encoding>${source.encoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <configuration>
                        <encoding>${source.encoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <includes>
                            <include>**/Test*.java</include>
                            <include>**/*Test.java</include>
                        </includes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.lesscss</groupId>
                    <artifactId>lesscss-maven-plugin</artifactId>
                    <version>${less.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>1.4</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <configuration>
                    <workingDirectory>${basedir}</workingDirectory>
                    <nodeVersion>${fe.node.version}</nodeVersion>
                    <npmVersion>${fe.npm.version}</npmVersion>
                    <installDirectory>${fe.node.installdir}</installDirectory>
                </configuration>
                <executions>
                    <execution>
                        <inherited>false</inherited>
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                        <phase>generate-resources</phase>
                    </execution>
                    <execution>
                        <inherited>false</inherited>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <phase>generate-resources</phase>
                    </execution>
                    <execution>
                        <inherited>false</inherited>
                        <id>npm test</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <arguments>test</arguments>
                            <failOnError>true</failOnError>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>bitbucket-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <products>
                        <product>
                            <id>bitbucket</id>
                            <instanceId>bitbucket</instanceId>
                            <version>${bitbucket.version}</version>
                            <dataVersion>${bitbucket.data.version}</dataVersion>

                            <pluginArtifacts>
                                <!-- See https://bitbucket.org/atlassianlabs/quickreload -->
                                <pluginArtifact>
                                    <groupId>com.atlassian.labs.plugins</groupId>
                                    <artifactId>quickreload</artifactId>
                                    <version>${quick.reload.version}</version>
                                </pluginArtifact>
                            </pluginArtifacts>
                        </product>
                    </products>

                    <enablePde>false</enablePde>
                    <enableQuickReload>true</enableQuickReload>
                    <quickReloadVersion>${quick.reload.version}</quickReloadVersion>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <!-- Local modules -->
            <dependency>
                <groupId>com.atlassian.integration.jira</groupId>
                <artifactId>jira-integration-api</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.integration.jira</groupId>
                <artifactId>jira-integration-spi</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.integration.jira</groupId>
                <artifactId>jira-integration-page-objects</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.integration.jira</groupId>
                <artifactId>jira-integration-plugin</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.integration.jira</groupId>
                <artifactId>jira-integration-func-tests</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- Platform dependencies -->
            <dependency>
                <groupId>com.atlassian.platform</groupId>
                <artifactId>platform</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform</groupId>
                <artifactId>third-party</artifactId>
                <version>${platform.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>

            <!-- Other dependencies -->
            <dependency>
                <groupId>com.atlassian.applinks</groupId>
                <artifactId>applinks-tests</artifactId>
                <version>${ual.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira</groupId>
                <artifactId>jira-api</artifactId>
                <version>${jira.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.profiling</groupId>
                <artifactId>atlassian-profiling</artifactId>
                <version>${profiling.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.selenium</groupId>
                <artifactId>atlassian-pageobjects-elements</artifactId>
                <version>${atl.sel.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.selenium</groupId>
                <artifactId>atlassian-webdriver-core</artifactId>
                <version>${atl.sel.version}</version>
                <!-- the Firefox profile that is bundled launches Firefox with Firebug. This can cause
                    problems. We exclude the bundled Firefox profile, and supply our own which is the "nofirebug"
                    variant -->
                <exclusions>
                    <exclusion>
                        <groupId>com.atlassian.browsers</groupId>
                        <artifactId>firefox-profile</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- this brings in the "nofirebug" Firefox browser dependency mentioned above -->
            <dependency>
                <groupId>com.atlassian.browsers</groupId>
                <artifactId>firefox-profile</artifactId>
                <version>${firefox.profile}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.bitbucket.server</groupId>
                <artifactId>bitbucket-it-common</artifactId>
                <exclusions>
                    <exclusion>
                        <groupId>asm</groupId>
                        <artifactId>asm</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-core</artifactId>
                    </exclusion>
                </exclusions>
                <version>${bitbucket.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.bitbucket.server</groupId>
                <artifactId>bitbucket-api</artifactId>
                <version>${bitbucket.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.bitbucket.server</groupId>
                <artifactId>bitbucket-page-objects</artifactId>
                <version>${bitbucket.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.stash.git</groupId>
                <artifactId>jira-integration</artifactId>
                <version>1.1</version>
                <type>zip</type>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>issue-status-plugin</artifactId>
                <version>${issue-status-plugin.version}</version>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>1.0.13</version>
            </dependency>
            <dependency>
                <groupId>com.jayway.restassured</groupId>
                <artifactId>rest-assured</artifactId>
                <version>2.4.1</version>
            </dependency>
            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <version>${jaxb.version}</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jettison</groupId>
                <artifactId>jettison</artifactId>
                <version>1.1</version>
                <exclusions>
                    <exclusion>
                        <groupId>stax</groupId>
                        <artifactId>stax-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>20170516</version>
            </dependency>
            <!-- Overrides the version define in the platform pom because the tests need updating for 2.x -->
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>1.9.5</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com/cp/jira-integration-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/cp/jira-integration-plugin.git</developerConnection>
        <url>https://stash.atlassian.com/projects/CP/repos/jira-integration-plugin</url>
        <tag>jira-integration-parent-6.2.0</tag>
    </scm>

    <profiles>
        <profile>
            <id>it</id>
            <activation>
                <property>
                    <!--if test group is supplied, it means we want tests!-->
                    <name>testGroup</name>
                </property>
            </activation>
            <modules>
                <module>page-objects</module>
                <module>func-tests</module>
            </modules>
        </profile>
    </profiles>
</project>
