<?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-ancillary-plugins</artifactId>
        <version>18.8.25-CONFSRVDEV-29154-m01</version>
    </parent>

    <groupId>com.atlassian.querylang</groupId>
    <artifactId>confluence-cql-plugin-parent</artifactId>
    <packaging>pom</packaging>

    <name>confluence-cql-plugin-parent</name>
    <description>This is the confluence cql plugin parent</description>
    <organization>
        <name>Atlassian</name>
    </organization>
    <licenses>
        <license>
            <name>Atlassian 3.0 End User License Agreement</name>
            <url>http://www.atlassian.com/end-user-agreement/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <modules>
        <module>confluence-query-lang-spi</module>
        <module>confluence-cql-plugin</module>
        <module>confluence-cql-test-support</module>
        <module>integration-tests</module>
    </modules>

    <issueManagement>
        <system>jira</system>
        <url>https://jira.atlassian.com/browse/CRA</url>
    </issueManagement>
    <ciManagement>
        <system>bamboo</system>
        <url>https://server-syd-bamboo.internal.atlassian.com/browse/CBP-CQL</url>
    </ciManagement>

    <properties>
        <antlr.version>4.3</antlr.version>
        <aql.version>4.0.3</aql.version>
        <webdriver.browser>chrome</webdriver.browser>
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <!-- For the flaky test reporter profile. -->
        <!-- override the versions of the listed plugins in amps -->
        <version.override.set>maven-failsafe-plugin</version.override.set>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- dependencies that should also have dependencyManagement entries in confluence-plugins-platform-pom -->
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-test-support</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-testutils</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.querylang</groupId>
                <artifactId>atlassian-query-lang</artifactId>
                <version>${aql.version}</version>
                <exclusions>
                    <!-- prefer jsr305 -->
                    <exclusion>
                        <groupId>com.google.code.findbugs</groupId>
                        <artifactId>annotations</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>com.atlassian.querylang</groupId>
                <artifactId>atlassian-query-lang-spi</artifactId>
                <version>${aql.version}</version>
            </dependency>
            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-runtime</artifactId>
                <version>${antlr.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>confluence-maven-plugin</artifactId>
                    <version>${amps8.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${surefire.version}</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${surefire.version}</version>
                    <configuration>
                        <!-- Ignoring integration tests on test phase so they just run in integration-test phase.-->
                        <!-- This configuration is necessary when using AMPS together with a parent POM.-->
                        <excludes>
                            <exclude>it/rest/**</exclude>
                            <exclude>**/*$*</exclude>
                            <!-- surefire y u run inner classes -->
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.atlassian.drs</groupId>
                <artifactId>dependency-report-maven-plugin</artifactId>
                <version>${dependency-report-maven-plugin.version}</version>
                <configuration>
                    <project>confluence-cql-plugin</project>
                    <gracefulFailure>true</gracefulFailure>
                </configuration>
                <executions>
                    <execution>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>upload</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
