<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>closedsource-pom</artifactId>
        <version>5.0.23</version>
    </parent>

    <groupId>com.atlassian.bitbucket.plugin</groupId>
    <artifactId>bitbucket-mirror-plugin</artifactId>
    <version>3.0.0</version>
    <packaging>atlassian-plugin</packaging>
    <name>Bitbucket Server - Mirroring Plugin</name>
    <description>Update a Bitbucket Server repository when triggered by a webhook</description>

    <scm>
        <connection>scm:git:ssh://git@stash.dev.internal.atlassian.com:7999/STASH/bitbucket-mirror-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@stash.dev.internal.atlassian.com:7999/STASH/bitbucket-mirror-plugin.git</developerConnection>
        <url>scm:git:http://stash.dev.internal.atlassian.com/git/STASH/bitbucket-mirror-plugin.git</url>
        <tag>bitbucket-mirror-plugin-3.0.0</tag>
    </scm>

    <organization>
        <name>Atlassian, Inc</name>
        <url>http://www.atlassian.com</url>
    </organization>

    <properties>
        <maven.compiler.source>8</maven.compiler.source>
        <maven.compiler.target>8</maven.compiler.target>
        <source.encoding>UTF-8</source.encoding>

        <amps.version>6.3.18</amps.version>
        <bitbucket.version>6.0.0-m5</bitbucket.version>
        <bitbucket.data.version>${bitbucket.version}</bitbucket.data.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>bitbucket-maven-plugin</artifactId>
                <extensions>true</extensions>
                <version>${amps.version}</version>
                <configuration>
                    <enableFastdev>false</enableFastdev>
                    <instructions>
                        <Atlassian-Plugin-Key>${project.groupId}.${project.artifactId}</Atlassian-Plugin-Key>
                        <Import-Package>
                            javax.servlet;version="2.5",
                            javax.servlet.http;version="2.5",
                            org.slf4j;version="1.7",
                            *
                        </Import-Package>
                        <Private-Package>
                            com.atlassian.bitbucket.internal*,
                            com.atlassian.stash.internal*
                        </Private-Package>
                    </instructions>
                    <products>
                        <product>
                            <id>bitbucket</id>
                            <version>${bitbucket.version}</version>
                            <dataVersion>${bitbucket.data.version}</dataVersion>
                            <systemPropertyVariables>
                                <atlassian.dev.mode>false</atlassian.dev.mode>
                                <!-- Override the fetch delay to make testing faster -->
                                <plugin.bitbucket-mirror.fetch.delay>0</plugin.bitbucket-mirror.fetch.delay>
                                <!-- The default HTTPs URLs cause the tests to block and timeout at the username -->
                                <!-- and password prompt, so we switch them here to SSH. -->
                                <plugin.bitbucket-mirror.fetch.server.url>ssh://git@stash.dev.internal.atlassian.com:7999/</plugin.bitbucket-mirror.fetch.server.url>
                                <plugin.bitbucket-mirror.fetch.cloud.url>ssh://git@bitbucket.org/</plugin.bitbucket-mirror.fetch.cloud.url>
                                <plugin.bitbucket-mirror.local.username>configured-mirror-username</plugin.bitbucket-mirror.local.username>
                            </systemPropertyVariables>
                        </product>
                    </products>
                    <testGroups>
                        <testGroup>
                            <id>integration-tests</id>
                            <productIds>
                                <productId>bitbucket</productId>
                            </productIds>
                            <includes>
                                <include>it/**/*.java</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>it/**/*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>net.sf.alchim</groupId>
                <artifactId>yuicompressor-maven-plugin</artifactId>
                <version>0.7.1</version>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                    <executions>
                        <execution>
                            <id>ban-milestones-and-release-candidates</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <banVersionDeps>
                                        <excludes>
                                            <!-- Sometimes we need to use new APIs before a full release -->
                                            <exclude>com.atlassian.bitbucket.server</exclude>
                                        </excludes>
                                    </banVersionDeps>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <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>

    <dependencies>
        <!-- Bitbucket API -->
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-util</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Atlassian's (SAL, etc., provided by the plugin system) -->

        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- others (provided by the plugin system) -->

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- test -->

        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-it-common</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-page-objects</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-test-util</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
