<?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.bamboo</groupId>
    <artifactId>atlassian-bamboo-plugins2-parent</artifactId>
    <version>6.10.3</version>
  </parent>

  <groupId>com.atlassian.bamboo.plugins</groupId>
  <artifactId>atlassian-bamboo-plugin-bitbucket</artifactId>
  <packaging>atlassian-plugin</packaging>

  <name>Atlassian Bamboo Bitbucket Repository Plugin</name>
  <description>Atlassian Bamboo Bitbucket Repository Plugin</description>

  <properties>
    <atlassian.plugin.key>com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-bitbucket</atlassian.plugin.key>
    <bamboo.tests.bitbucket.base.url>https://bitbucket.org/</bamboo.tests.bitbucket.base.url>
    <bamboo.tests.bitbucket.api.url>https://api.bitbucket.org/2.0</bamboo.tests.bitbucket.api.url>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-web</artifactId>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-deployments-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.atlassian.utils</groupId>
      <artifactId>atlassian-processutils</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-rest-common</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.plugins.rest</groupId>
      <artifactId>atlassian-rest-common</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo.plugins</groupId>
      <artifactId>atlassian-bamboo-plugin-git</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo.plugins</groupId>
      <artifactId>atlassian-bamboo-plugin-mercurial</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.atlassian.plugin</groupId>
      <artifactId>atlassian-spring-scanner-annotation</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <scope>${scope.test.on.java9plus}</scope>
    </dependency>

    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-core</artifactId>
      <scope>${scope.test.on.java9plus}</scope>
    </dependency>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>io.atlassian.util.concurrent</groupId>
      <artifactId>atlassian-util-concurrent</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.atlassian.plugins</groupId>
      <artifactId>atlassian-plugins-core</artifactId>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- test dependencies -->
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-pageobjects</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-test-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo.plugins</groupId>
      <artifactId>atlassian-bamboo-plugin-ssh</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo.plugins</groupId>
      <artifactId>atlassian-bamboo-plugin-test-utils</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo.plugins</groupId>
      <artifactId>bamboo-plugin-test-resources</artifactId>
      <type>zip</type>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.bamboo.triggers</groupId>
      <artifactId>atlassian-bamboo-triggers</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.stefanbirkner</groupId>
      <artifactId>system-rules</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.tomakehurst</groupId>
      <artifactId>wiremock</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.mina</groupId>
      <artifactId>mina-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.bouncycastle</groupId>
      <artifactId>bcprov-jdk15on</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>pl.pragmatists</groupId>
      <artifactId>JUnitParams</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>release-profile</id>
      <properties>
        <skipTests>true</skipTests>
      </properties>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
              <skip>true</skip>
              <skipTests>true</skipTests>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>bamboo-maven-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <output>${project.build.directory}/bamboo.log</output>
          <productVersion>${atlassian.product.version}</productVersion>
          <productDataVersion>${atlassian.product.data.version}</productDataVersion>
          <pluginArtifacts>
            <pluginArtifact>
              <groupId>com.atlassian.bamboo.plugins</groupId>
              <artifactId>atlassian-bamboo-plugin-test-utils</artifactId>
            </pluginArtifact>
           </pluginArtifacts>
          <instructions>
            <Import-Package>
              com.atlassian.bamboo.plugins.hg,
              com.atlassian.bamboo.plugins.hg.configuration,
              *;resolution:=optional
            </Import-Package>
          </instructions>
          <systemPropertyVariables>
            <atlassian.darkfeature.bamboo.experimental.rest.admin.enabled>true</atlassian.darkfeature.bamboo.experimental.rest.admin.enabled>
            <atlassian.darkfeature.bamboo.improved.admin.panel.nav>true</atlassian.darkfeature.bamboo.improved.admin.panel.nav>
            <atlassian.bamboo.bitbucket.base.url>${bamboo.tests.bitbucket.base.url}</atlassian.bamboo.bitbucket.base.url>
            <atlassian.bamboo.bitbucket.api.v2.base.url>${bamboo.tests.bitbucket.api.url}</atlassian.bamboo.bitbucket.api.v2.base.url>
          </systemPropertyVariables>
          <products>
            <product>
              <id>bamboo</id>
              <instanceId>bamboo</instanceId>
            </product>
          </products>
          <testGroups>
            <testGroup>
              <!-- basic BbC integration tests - see 'it' package-info -->
              <id>bitbucket-integration-tests</id>
              <productIds>
                <productId>bamboo</productId>
              </productIds>
              <includes>
                <include>it/**/*.java</include>
              </includes>
              <excludes>
                <exclude>it/remote/**/*.java</exclude>
              </excludes>
            </testGroup>
            <testGroup>
              <!-- complex BbC integration tests - see 'it.remote' package-info -->
              <id>bitbucket-remote-integration-tests</id>
              <productIds>
                <productId>bamboo</productId>
              </productIds>
              <includes>
                <include>it/remote/**/*.java</include>
              </includes>
            </testGroup>
          </testGroups>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
