<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.confluence.plugins</groupId>
        <artifactId>confluence-public-plugins</artifactId>
        <version>19.2.18</version>
    </parent>

    <artifactId>confluence-business-blueprints-parent</artifactId>
    <packaging>pom</packaging>

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

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

    <properties>
        <atlassian.dev.mode>false</atlassian.dev.mode>
        <baseurl.confluence>http://localhost:${http.confluence.port}/${context.confluence.path}</baseurl.confluence>
        <context.confluence.path>confluence</context.confluence.path>
        <download.maven.plugin.version>1.6.8</download.maven.plugin.version>
        <http.confluence.port>${http.port}</http.confluence.port>
        <http.port>1990</http.port>
        <httpcomponents.httpcore5.version>5.2.3</httpcomponents.httpcore5.version>
        <share-page.version>6.0.14</share-page.version>
        <version.override.set>maven-surefire-plugin,maven-failsafe-plugin</version.override.set>
        <whitelist-version>5.0.8</whitelist-version>
        <xvfb.display>:0</xvfb.display>
        <xvfb.enable>false</xvfb.enable>
    </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>
            <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>
            <!--
            Remove httpcore5 dependency from dependencyManagement when confluence.version is upgraded to 8.6.0
            Or what ever version that has httpcore5 higher version >= 5.2.2
            -->
            <dependency>
                <groupId>org.apache.httpcomponents.core5</groupId>
                <artifactId>httpcore5</artifactId>
                <version>${httpcomponents.httpcore5.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <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>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <phase>validate</phase>
                        <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>
