<?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.29</version>
    </parent>

    <groupId>com.atlassian.confluence.plugins.search</groupId>
    <artifactId>confluence-search-plugin-parent</artifactId>
    <version>3.5.3</version>
    <packaging>pom</packaging>

    <name>Confluence Search Plugin Parent</name>
    <description>This is the Confluence Search Plugin for Atlassian Confluence.</description>
    <organization>
        <name>Atlassian</name>
        <url>http://www.atlassian.com/</url>
    </organization>

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

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

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <confluence.version>7.0.1-m119</confluence.version>
        <confluence.data.version>${confluence.version}</confluence.data.version>
        <cql.version>4.1.8</cql.version>
        <amps8.version>8.0.2</amps8.version>
        <pagerank.version>1.0.4</pagerank.version>
        <mockito.version>2.28.2</mockito.version>
        <byte-buddy.version>1.9.13</byte-buddy.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>
        <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>
        <enableDevToolbox>false</enableDevToolbox>
        <enablePde>false</enablePde>
        <atlassian.dev.mode>false</atlassian.dev.mode>
        <compressResources>false</compressResources>
        <containerId>tomcat9x</containerId>
        <webdriver.browser>firefox</webdriver.browser>
        <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>
        <version.override.set>maven-failsafe-plugin,maven-surefire-plugin</version.override.set>
        <surefire.version>2.22.2</surefire.version>
        <download.maven.plugin.version>1.3.0</download.maven.plugin.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>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>atlassian-confluence-pageobjects</artifactId>
                <version>${confluence.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.querylang</groupId>
                <artifactId>confluence-query-lang-spi</artifactId>
                <version>${cql.version}</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.search</groupId>
                <artifactId>pagerank</artifactId>
                <version>${pagerank.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy-agent</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy-dep</artifactId>
                <version>${byte-buddy.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.2</version>
                    <executions>
                        <execution>
                            <id>copy-checkstyle-suppressions</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.basedir}/target/codestyle</outputDirectory>
                                <overwrite>true</overwrite>
                                <resources>
                                    <resource>
                                        <directory>src/codestyle</directory>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.1.1</version>
                    <executions>
                        <execution>
                            <id>testjar</id>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                            <configuration>
                                <skip>false</skip>
                                <forceCreation>true</forceCreation>
                            </configuration>
                        </execution>
                    </executions>
                </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/**</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${surefire.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.googlecode.maven-download-plugin</groupId>
                    <artifactId>download-maven-plugin</artifactId>
                    <version>${download.maven.plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>confluence-maven-plugin</artifactId>
                    <version>${amps8.version}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <jvmArgs>${jvm.args}</jvmArgs>
                        <productVersion>${confluence.version}</productVersion>
                        <productDataVersion>${confluence.data.version}</productDataVersion>
                        <allowGoogleTracking>${enableDevToolbox}</allowGoogleTracking>
                        <skipAllPrompts>true</skipAllPrompts>
                        <enableDevToolbox>${enableDevToolbox}</enableDevToolbox>
                        <enablePde>${enablePde}</enablePde>
                        <extractDependencies>false</extractDependencies>
                        <extractTestDependencies>false</extractTestDependencies>
                        <compressResources>${compressResources}</compressResources>
                        <server>localhost</server>
                        <pluginArtifacts>
                            <pluginArtifact>
                                <groupId>com.atlassian.confluence.plugins.search</groupId>
                                <artifactId>confluence-search</artifactId>
                                <version>${project.version}</version>
                            </pluginArtifact>
                        </pluginArtifacts>
                        <systemPropertyVariables>
                            <!-- This sets a system property required by the Functest RPC plugin to run in this environment -->
                            <confluence.version>${confluence.version}</confluence.version>
                            <xvfb.enable>${xvfb.enable}</xvfb.enable>
                            <xvfb.display>${xvfb.display}</xvfb.display>
                            <http.port>${http.confluence.port}</http.port>
                            <baseurl.confluence>${baseurl.confluence}</baseurl.confluence>
                            <context.path>${context.confluence.path}</context.path>
                            <atlassian.dev.mode>${atlassian.dev.mode}</atlassian.dev.mode>
                            <webdriver.browser>${webdriver.browser}</webdriver.browser>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
