<?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">
    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>public-pom</artifactId>
        <version>5.0.26</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.atlassian.confluence.plugins</groupId>
    <artifactId>confluence-business-blueprints-parent</artifactId>
    <version>7.2.0</version>

    <modules>
        <module>plugin</module>
        <module>integration-tests</module>
    </modules>

    <name>Confluence Business Blueprints</name>
    <description>
        This is the Confluence Business Blueprints Bundle for Atlassian Confluence,
        containing Blueprints useful to Business teams.
    </description>
    <packaging>pom</packaging>

    <scm>
        <connection>scm:git:git@bitbucket.org:atlassian/confluence-business-blueprints.git</connection>
        <developerConnection>scm:git:git@bitbucket.org:atlassian/confluence-business-blueprints.git</developerConnection>
        <url>https://bitbucket.org/atlassian/confluence-business-blueprints</url>
      <tag>confluence-business-blueprints-parent-7.2.0</tag>
  </scm>

    <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>share-page</artifactId>
                <version>${share-page.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-whitelist-test-utils</artifactId>
                <version>${whitelist-version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <properties>
        <confluence.version>7.0.1-beta2</confluence.version>
        <confluence.data.version>${confluence.version}</confluence.data.version>
        <amps8.version>8.0.2</amps8.version>
        <container>tomcat9x</container>

        <share-page.version>6.0.14</share-page.version>
        <legacy.create-content.version>6.0.19</legacy.create-content.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>

        <whitelist-version>3.0.2</whitelist-version>

        <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>

        <download.maven.plugin.version>1.3.0</download.maven.plugin.version>
        <version.override.set>maven-surefire-plugin,maven-failsafe-plugin</version.override.set>
        <surefire.version>2.22.0</surefire.version>
    </properties>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>confluence-maven-plugin</artifactId>
                    <version>${amps8.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>confluence-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <jvmArgs>${jvm.args}</jvmArgs>
                </configuration>
            </plugin>
            <!-- override the enforcer plugin so that we can do the release dance against a milestone of confluence
            This will be removed when the PR https://bitbucket.org/atlassian/confluence-business-blueprints/pull-requests/148 is merged -->
            <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>
                                        <exclude>com.atlassian.confluence:*</exclude><!-- TODO: remove when on a non-milestone version-->
                                    </excludes>
                                </banVersionDeps>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
