<?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-previews-parent</artifactId>
    <version>5.0.6</version>
    <packaging>pom</packaging>

    <name>Confluence Previews Parent</name>
    <description>Preview lightbox for files and images</description>
    <organization>
        <name>Atlassian</name>
        <url>http://www.atlassian.com/</url>
    </organization>

    <modules>
        <module>confluence-previews</module>
        <module>confluence-previews-integration-tests</module>
        <module>confluence-previews-test-support</module>
    </modules>

    <scm>
        <connection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/confluence-previews.git</connection>
        <developerConnection>scm:git:ssh://git@stash.atlassian.com:7997/confserver/confluence-previews.git</developerConnection>
        <url>https://stash.atlassian.com/projects/CONFSERVER/repos/confluence-previews</url>
        <tag>confluence-previews-parent-5.0.6</tag>
    </scm>

    <properties>
        <confluence.version>6.2.4</confluence.version>
        <confluence.data.version>${confluence.version}</confluence.data.version>
        <amps.version>6.3.13</amps.version>
        <!-- TODO - these two versions can be removed in future when the Karma tests are launched by node and not Maven -->
        <aui.version>5.7.34</aui.version>
        <jquery.version>1.7.2</jquery.version>
        <xvfb.enable>false</xvfb.enable>
        <xvfb.display>:0</xvfb.display>
        <http.port>1990</http.port>
        <http.confluence.port>${http.port}</http.confluence.port>
        <context.confluence.path>confluence</context.confluence.path>
        <baseurl.confluence>http://localhost:${http.confluence.port}/${context.confluence.path}</baseurl.confluence>
        <atlassian.dev.mode>false</atlassian.dev.mode>
        <containerId>tomcat8x</containerId>
        <jvm.args.custom /> <!-- Allows to specify custom arguments in build scripts -->
        <jvm.args.xmx>1024m</jvm.args.xmx>
        <jvm.args>-Xmx${jvm.args.xmx} ${jvm.args.custom}</jvm.args>

        <!-- For the flaky test reporter profile. -->
        <version.override.set>maven-failsafe-plugin</version.override.set>
        <surefire.version>2.20.1</surefire.version>
        <flaky.test.reporter.version>1.3.10</flaky.test.reporter.version>
    </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>
            <!-- These are required in case we end up getting these artifacts via the platform pom. -->
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-previews</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence.plugins</groupId>
                <artifactId>confluence-previews-test-support</artifactId>
                <version>${project.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <forceCreation>true</forceCreation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-confluence-plugin</artifactId>
                    <version>${amps.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
