<?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>3.0.100</version>
    </parent>

    <organization>
        <name>Atlassian</name>
        <url>http://www.atlassian.com/</url>
    </organization>

    <name>Atlassian JIRA - Plugins - Projects</name>
    <groupId>com.atlassian.jira</groupId>
    <artifactId>jira-projects-parent</artifactId>
    <description>Provides a project centric view of JIRA</description>
    <version>1000.0.22-D20160919T081300</version>
    <packaging>pom</packaging>
    <licenses>
        <license>
            <name>Atlassian End User License</name>
            <url>https://www.atlassian.com/end-user-agreement/</url>
            <comments>Atlassian 3.0 End User License Agreement</comments>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com:7997/jiracloud/jira-projects.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/jiracloud/jira-projects.git</developerConnection>
        <url>https://stash.atlassian.com/projects/JIRACLOUD/repos/jira-projects</url>
        <tag>HEAD</tag>
    </scm>

    <ciManagement>
        <system>Bamboo</system>
        <url>https://jira-cloud-bamboo.internal.atlassian.com/browse/JP</url>
    </ciManagement>

    <modules>
        <module>jira-projects-api</module>
        <module>jira-projects-page-objects</module>
        <module>jira-projects-plugin</module>
        <module>jira-projects-reference-plugin</module>
    </modules>

    <profiles>
        <profile>
            <id>freezer-release-profile</id>
            <properties>
                <skipITs>true</skipITs>
                <skipTests>false</skipTests> <!-- The plan template expects at least one test -->
            </properties>
        </profile>
        <profile>
            <id>noDev</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-jira-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <atlassian.dev.mode>false</atlassian.dev.mode>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>bigpipe</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-jira-plugin</artifactId>
                        <configuration>
                            <systemPropertyVariables>
                                <atlassian.darkfeature.com.atlassian.jira.config.BIG_PIPE>true</atlassian.darkfeature.com.atlassian.jira.config.BIG_PIPE>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>plan-templates</id>
            <modules>
                <module>plan-templates</module>
            </modules>
        </profile>
        <profile>
            <!-- This is in here so that it only runs in bamboo, not locally -->
            <id>postgres</id>
            <build>
                <plugins>
                    <plugin>
                        <!-- This plugin will start postgres jira database docker container in compile phase-->
                        <!--jira database is configured to contain database 'jira' user 'jira' with password 'jira'-->
                        <!--jira database is prepopulated with the user admin/admin and test licence-->
                        <groupId>io.fabric8</groupId>
                        <artifactId>docker-maven-plugin</artifactId>
                        <version>0.14.2</version>
                        <configuration>
                            <images>
                                <image>
                                    <name>${postgres.docker.image}</name>
                                    <run>
                                        <ports>
                                            <!-- Port mappings: Container internal port 5432 will be
                                            dynamically mapped and this (random) port will be assigned to the maven variable
                                            ${database.port}. -->
                                            <port>${database.port}:5432</port>
                                        </ports>
                                        <wait>
                                            <!-- Docker container requires some time to start, if we connect too early we will fail
                                            This timeout is set to 30 seconds because Docker images can be slow to start in Bamboo. -->
                                            <time>30000</time>
                                        </wait>
                                    </run>
                                </image>
                            </images>
                        </configuration>
                        <!-- Connect this plugin to the maven lifecycle around the integration-test phase. I.e. start the
                         container in compile and stop it in post-integration-test. -->
                        <executions>
                            <execution>
                                <id>start</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>start</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>stop</id>
                                <phase>post-integration-test</phase>
                                <goals>
                                    <goal>stop</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <amps.version>6.1.2</amps.version>
        <atlassian-analytics.version>3.68</atlassian-analytics.version>
        <atlassian-plugin.description>${project.description}</atlassian-plugin.description>
        <atlassian-plugin.version>${project.version}</atlassian-plugin.version>
        <atlassian.qunit.plugin.version>1.0.0-m5</atlassian.qunit.plugin.version>
        <atlassian.spring.scanner.version>1.2.9</atlassian.spring.scanner.version>
        <spring.version>2.5.6.SEC03</spring.version>
        <enable.fastdev>false</enable.fastdev>
        <enable.quckreload>false</enable.quckreload>
        <enable.devToolbox>false</enable.devToolbox>
        <gh.version>6.7-breakit-5</gh.version>
        <jira.version>1000.362.0</jira.version>
        <jira-issue-nav-components.version>8.0.4</jira-issue-nav-components.version>
        <jira-issue-nav-plugin.version>${jira-issue-nav-components.version}</jira-issue-nav-plugin.version>
        <webdriver.version>2.4.0</webdriver.version>
        <plugin.testrunner.version>1.1.2</plugin.testrunner.version>
        <pocketknife.version>0.63</pocketknife.version>
        <pocketknife-querydsl.version>3.0.3</pocketknife-querydsl.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <skipAllPrompts>true</skipAllPrompts>
        <testkit.version>1000.1.14</testkit.version>
        <atlassian.applinks.version>5.0.0</atlassian.applinks.version>
        <xvfb.enable>true</xvfb.enable>
        <compressJs>true</compressJs>
        <rest.doc.generation.skip>true</rest.doc.generation.skip>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <gson.verson>2.3.1</gson.verson>
        <activeobjects.version>0.29.3</activeobjects.version>
        <slf4j.version>1.7.9</slf4j.version>
        <atlassian-work-context.version>0.12.0</atlassian-work-context.version>

        <hallelujah.version>3.6</hallelujah.version>
        <atlassian.test.run.only.quarantined>false</atlassian.test.run.only.quarantined>
        <atlassian.test.suite.excludes />
        <atlassian.test.suite.includes />
        <jira.functest.single.testclass />
        <jira.hallelujah.queueId />
        <atlassian.test.suite.package>it.com.atlassian.jira.plugins.editor</atlassian.test.suite.package>
        <atlassian.test.target.dir>${project.build.directory}</atlassian.test.target.dir>

        <postgres.docker.image>docker.atlassian.io/unicorn/ondemand-postgres</postgres.docker.image>
        <database.port>32773</database.port>
        <jdbc.postgres.version>9.2-1003-jdbc4</jdbc.postgres.version>
        <atlassian.dev.mode>true</atlassian.dev.mode>
        <docker.host.address>localhost</docker.host.address>

    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.jira</groupId>
                <artifactId>atlassian-jira-pageobjects</artifactId>
                <version>${jira.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-simple</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>jetty</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mortbay.jetty</groupId>
                        <artifactId>jetty-util</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-annotation</artifactId>
                <version>${atlassian.spring.scanner.version}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugin</groupId>
                <artifactId>atlassian-spring-scanner-runtime</artifactId>
                <version>${atlassian.spring.scanner.version}</version>
                <scope>runtime</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context</artifactId>
                <version>${spring.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.verson}</version>
                <scope>compile</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira.tests</groupId>
                <artifactId>jira-testkit-client</artifactId>
                <version>${testkit.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-simple</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira.tests</groupId>
                <artifactId>jira-testkit-common</artifactId>
                <version>${testkit.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira.tests</groupId>
                <artifactId>jira-testkit-common</artifactId>
                <version>${testkit.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.activeobjects</groupId>
                <artifactId>activeobjects-core</artifactId>
                <version>${activeobjects.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.activeobjects</groupId>
                <artifactId>activeobjects-plugin</artifactId>
                <version>${activeobjects.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>4.4.1</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.11</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira</groupId>
                <artifactId>jira-issue-nav-components-pageobjects</artifactId>
                <version>${jira-issue-nav-components.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.applinks</groupId>
                <artifactId>applinks-api</artifactId>
                <version>${atlassian.applinks.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>1.10.19</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j.version}</version>
            </dependency>

            <!-- QueryDSL -->
            <dependency>
                <groupId>com.atlassian.pocketknife</groupId>
                <artifactId>atlassian-pocketknife-querydsl</artifactId>
                <version>${pocketknife-querydsl.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.pocketknife</groupId>
                <artifactId>atlassian-pocketknife-querydsl-test-util</artifactId>
                <version>${pocketknife-querydsl.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-amps-dispatcher-plugin</artifactId>
                    <version>${amps.version}</version>
                </plugin>
                <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-surefire-plugin</artifactId>
                    <version>2.15</version>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-jira-plugin</artifactId>
                    <version>${amps.version}</version>
                    <configuration>
                        <systemPropertyVariables>
                            <plugin.resource.directories>${basedir}/target/classes</plugin.resource.directories>
                            <atlassian.dev.mode>${atlassian.dev.mode}</atlassian.dev.mode>
                            <PG_DB_ROLE>jira</PG_DB_ROLE>
                            <PG_DB_HOST>${docker.host.address}</PG_DB_HOST>
                            <PG_DB_NAME>jira</PG_DB_NAME>
                            <PG_DB_PASSWORD>jira</PG_DB_PASSWORD>
                            <PG_DB_PORT>${database.port}</PG_DB_PORT>
                        </systemPropertyVariables>
                        <libArtifacts>
                            <libArtifact>
                                <groupId>org.postgresql</groupId>
                                <artifactId>postgresql</artifactId>
                                <version>${jdbc.postgres.version}</version>
                            </libArtifact>
                        </libArtifacts>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.4.1</version>
                <executions>
                    <execution>
                        <id>enforce-manven-3.2</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[3.2,)</version>
                                    <message>Under maven 3.0 guava.jar was incorrectly packed into META-INF/lib as local dependency.</message>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
