<?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-private-pom</artifactId>
        <version>6.3.6</version>
    </parent>

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

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

    <properties>
        <java.version.minimum>17</java.version.minimum>

        <maven.compiler.target>${java.version.minimum}</maven.compiler.target>
        <maven.compiler.source>${java.version.minimum}</maven.compiler.source>

        <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>

        <source.encoding>UTF-8</source.encoding>
        <platform.dependencies.version>7.0.4</platform.dependencies.version>
        <amps.version>8.17.3</amps.version>
        <atl.aui.pageobjects.version>1.0.0</atl.aui.pageobjects.version>
        <!-- If you update this, you should also update the selenium Docker image used by Bamboo in jira-integration-plugin.yml
             Since this plugin's func tests only run against Bitbucket, you should probably use whatever Bitbucket uses.
             https://hello.atlassian.net/wiki/spaces/BSERV/pages/1265423781/HOWTO+-+Upgrade+the+browser+used+by+func+tests -->
        <atl.selenium.version>3.3.5</atl.selenium.version>
        <issue-status-plugin.version>3.0.0</issue-status-plugin.version>
        <profiling.version>1.9</profiling.version>

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

        <!-- Product versions -->
        <bamboo.version>4.4.0</bamboo.version>
        <confluence.version>8.9.0-m38</confluence.version>
        <fecru.version>2.8.1-20120829051639</fecru.version>
        <!-- This is an older version of Jira, so we also need to use an older version of the applinks plugin so its compatible -->
        <jira.version>9.4.21</jira.version>
        <jira.applinks.version>9.0.10</jira.applinks.version>
        <refapp.version>5.0.0</refapp.version>
        <bitbucket.version>9.6.1</bitbucket.version>
        <bitbucket.test.version>${bitbucket.version}</bitbucket.test.version>
        <bitbucket.data.version>${bitbucket.version}</bitbucket.data.version>
        <!-- This must be a final version (not RC/dev) so can't always move in lock-step with bitbucket.version -->
        <bitbucket.osgi.version>8.9.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>

        <!-- Do not prefix version with 'v', update .nvmrc if you change this -->
        <fe.node.version>16.13.0</fe.node.version>
        <fe.npm.version>6.13.4</fe.npm.version>

        <quick.reload.version>5.0.4</quick.reload.version>
        <junit.version>4.13.2</junit.version>
        <hamcrest.version>2.2</hamcrest.version>
        <wiremock.version>2.33.2</wiremock.version>
        <guice.version>5.1.0</guice.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-maven-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>
                                    <bannedDependencies>
                                        <excludes>
                                            <!-- Old jakarta.*-api GAVs -->
                                            <exclude>javax.inject</exclude>
                                            <exclude>javax.servlet</exclude>
                                            <exclude>javax.xml.bind</exclude>
                                        </excludes>
                                        <message>Please check dependency:tree for banned dependencies</message>
                                        <searchTransitive>true</searchTransitive>
                                    </bannedDependencies>
                                    <banVersionDeps>
                                        <excludes>
                                            <!-- Allow BbS milestones/release candidates - this helps when developing
                                                 new integration features -->
                                            <exclude>com.atlassian.bitbucket.server:*</exclude>
                                        </excludes>
                                    </banVersionDeps>
                                    <requireJavaVersion>
                                        <version>${java.version.minimum}</version>
                                    </requireJavaVersion>
                                </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>v${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 ci</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.dependencies</groupId>
                <artifactId>platform-public-api</artifactId>
                <version>${platform.dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.platform.dependencies</groupId>
                <artifactId>platform-internal-api</artifactId>
                <version>${platform.dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>

            <!-- Other dependencies -->
            <dependency>
                <groupId>com.atlassian.applinks</groupId>
                <artifactId>applinks-tests</artifactId>
                <version>${ual.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.aui</groupId>
                <artifactId>aui-pageobjects</artifactId>
                <version>${atl.aui.pageobjects.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-api</artifactId>
                <version>${atl.selenium.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.inject</groupId>
                        <artifactId>guice</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.atlassian.selenium</groupId>
                <artifactId>atlassian-pageobjects-elements</artifactId>
                <version>${atl.selenium.version}</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.test.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.github.tomakehurst</groupId>
                <artifactId>wiremock-jre8</artifactId>
                <version>${wiremock.version}</version>
                <exclusions>
                    <!-- Old jakarta.servlet-api GAV -->
                    <exclusion>
                        <groupId>javax.servlet</groupId>
                        <artifactId>javax.servlet-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>${guice.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>javax.inject</groupId>
                        <artifactId>javax.inject</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>io.rest-assured</groupId>
                <artifactId>rest-assured</artifactId>
                <version>5.2.0</version>
            </dependency>
            <dependency>
                <groupId>org.codehaus.jettison</groupId>
                <artifactId>jettison</artifactId>
                <version>1.5.4</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>2.21.0</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-10.0.11</tag>
    </scm>
</project>
