<?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.amps</groupId>
        <artifactId>atlassian-amps-product-plugins</artifactId>
        <version>8.3.0</version>
    </parent>

    <groupId>com.atlassian.maven.plugins</groupId>
    <artifactId>confluence-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>

    <name>Confluence Maven Plugin</name>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.maven.archetypes</groupId>
            <artifactId>confluence-plugin-archetype</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>invoker</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <configuration>
                            <scriptVariables>
                                <artifactId>${invoker.artifactId}</artifactId>
                                <product>${invoker.product}</product>
                            </scriptVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <properties>
                <invoker.product>confluence</invoker.product>
                <product.data.version>${confluence.data.version}</product.data.version>
                <product.database.type>no-database-type</product.database.type>
                <product.version>${confluence.version}</product.version>
            </properties>
        </profile>
        <!-- The invoker tests are split into batches so that they can be run in parallel Bamboo jobs -->
        <profile>
            <id>invoker-batch-1</id>
            <properties>
                <invoker.test>
                    integrationTestWithTestGroupTest,
                    remoteTest
                </invoker.test>
            </properties>
        </profile>
        <profile>
            <id>invoker-batch-2</id>
            <properties>
                <invoker.test>
                    compressLocalizedResourcesTest,
                    compressResourcesTest,
                    compressResourcesWithClosureOptionLanguageInTest,
                    compressResourcesWithIncludeParamTest,
                    copyBundledDependenciesTest,
                    createTest,
                    debugTest,
                    debugWithPortConflictTest,
                    debugWithTestGroupTest,
                    extractDependenciesTest,
                    filterPluginDescriptorWithPluginDescriptorTest,
                    filterPluginDescriptorWithoutPluginDescriptorTest,
                    generateManifestWhenDependencyContainsModuleInfoTest,
                    generateManifestWithInstructionsTest,
                    generateManifestWithNoInstructionsTest,
                    generateObrTest,
                    generateRestDocsTest,
                    integrationTestWithPortConflictTest,
                    jarWithExistingManifestTest,
                    quickreloadTest,
                    runWithPortConflictTest,
                    unitTest,
                    validateBannedDependenciesTest,
                    validateBannedDependenciesWithBannedTest,
                    validateManifestSkipValidationTest,
                    validateManifestWithInvalidManifestTest,
                    validateManifestWithValidManifestTest
                </invoker.test>
            </properties>
        </profile>
        <profile>
            <id>invoker-batch-3</id>
            <properties>
                <invoker.test>
                    createOsgiJavaConfigTest,
                    integrationTest,
                    runParallelTest,
                    runTest,
                    runWithTestGroupTest
                </invoker.test>
            </properties>
        </profile>
    </profiles>
</project>
