<?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>
        <artifactId>bitbucket-search-parent</artifactId>
        <groupId>com.atlassian.bitbucket.search</groupId>
        <version>4.0.0</version>
    </parent>

    <artifactId>plugins</artifactId>
    <name>Bitbucket Search - Server Plugins</name>
    <packaging>pom</packaging>

    <modules>
        <module>common</module>
        <module>indexing</module>
        <module>search</module>
        <module>embedded-elasticsearch</module>
    </modules>

    <profiles>
        <profile>
            <id>it</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <modules>
                <module>func-test</module>
            </modules>
            <properties>
                <skipIntegrationTests>false</skipIntegrationTests>
            </properties>
        </profile>
    </profiles>

    <properties>
        <bitbucket.version>4.14.0</bitbucket.version>
        <amps.version>6.3.0</amps.version>

        <search.osgi.version>${project.version}</search.osgi.version>
        <elasticsearch-client.osgi.version>${elasticsearch-client.version}</elasticsearch-client.osgi.version>
        <metrics.osgi.version>${metrics.version}</metrics.osgi.version>
        <metrics-spring.osgi.version>${metrics-spring.version}</metrics-spring.osgi.version>
        <fugue.osgi.version>${fugue.version}</fugue.osgi.version>
        <rxjava.osgi.version>${rxjava.version}</rxjava.osgi.version>
        <skipIntegrationTests>true</skipIntegrationTests>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.bitbucket.server</groupId>
                <artifactId>bitbucket-parent</artifactId>
                <version>${bitbucket.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <skipTests>${skip.unit.tests}</skipTests>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>bitbucket-maven-plugin</artifactId>
                    <version>${amps.version}</version>
                    <configuration>
                        <extractDependencies>true</extractDependencies>
                        <products>
                            <product>
                                <id>bitbucket</id>
                                <instanceId>bitbucket</instanceId>
                                <version>${bitbucket.version}</version>
                                <dataVersion>${bitbucket.version}</dataVersion>
                            </product>
                        </products>
                        <allowGoogleTracking>false</allowGoogleTracking>
                        <jvmArgs>-Xmx1g -Xms1g -Datlassian.dev.mode=true</jvmArgs>
                        <containerId>tomcat8x</containerId>
                        <skipAmpsPomCheck>true</skipAmpsPomCheck>
                        <enableFastdev>false</enableFastdev>
                        <useFastdevCli>false</useFastdevCli>
                        <enableDevToolbox>false</enableDevToolbox>
                        <enablePde>true</enablePde>
                        <enableQuickReload>true</enableQuickReload>
                        <quickReloadVersion>1.28</quickReloadVersion>
                        <compressJs>false</compressJs>
                        <compressCss>false</compressCss>
                        <compressResources>false</compressResources>
                    </configuration>
                </plugin>
                <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>
                                            <!-- Allow Bitbucket Server RCs/milestones so we can use pre-release API changes to BbS -->
                                            <exclude>com.atlassian.bitbucket.server</exclude>
                                            <!-- RC is quite appropriate for translations -->
                                            <exclude>com.atlassian.translations</exclude>
                                            <!-- may be removed after moving off qunit to karma; see
                                                 https://bitbucket.org/atlassian/atlassian-plugins-webresource/pull-request/21/plugweb-92-move-from-qunit-maven-plugin-to -->
                                            <exclude>com.atlassian.qunit</exclude>
                                            <!-- still waiting for 2.8.0 to be released -->
                                            <exclude>com.atlassian.crowd</exclude>
                                            <exclude>com.atlassian.webhooks</exclude>
                                            <!-- atlassian-selenium is for testing only and won't be released until
                                                 we have a stable Selenium version -->
                                            <exclude>com.atlassian.selenium</exclude>
                                        </excludes>
                                    </banVersionDeps>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>
