<?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-mercurial</artifactId>
  <packaging>atlassian-plugin</packaging>

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

  <properties>
    <atlassian.plugin.key>com.atlassian.bamboo.plugins.atlassian-bamboo-plugin-mercurial</atlassian.plugin.key>
  </properties>

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

    <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.plugins</groupId>
      <artifactId>atlassian-plugins-core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.utils</groupId>
      <artifactId>atlassian-processutils</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.atlassian.plugins.rest</groupId>
      <artifactId>atlassian-rest-common</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>io.atlassian.util.concurrent</groupId>
      <artifactId>atlassian-util-concurrent</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</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.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>pl.pragmatists</groupId>
      <artifactId>JUnitParams</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>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-core</artifactId>
      <version>${tomcat8x.platform.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.atlassian.plugin</groupId>
        <artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <properties>
            <property>
              <name>listener</name>
              <value>com.atlassian.bamboo.plugins.hg.utils.LocalRepositoryRunListener</value>
            </property>
          </properties>
        </configuration>
      </plugin>
      <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>
          <systemPropertyVariables>
            <atlassian.darkfeature.bamboo.experimental.rest.admin.enabled>true</atlassian.darkfeature.bamboo.experimental.rest.admin.enabled>
            <atlassian.darkfeature.bamboo.sox.compliance.configurable>true</atlassian.darkfeature.bamboo.sox.compliance.configurable>
            <atlassian.darkfeature.bamboo.improved.admin.panel.nav>true</atlassian.darkfeature.bamboo.improved.admin.panel.nav>
            <bamboo.darkfeature.repository.dashboard>true</bamboo.darkfeature.repository.dashboard>
            <bamboo.enable.chains>true</bamboo.enable.chains>
            <webdriver.firefox.logfile>${project.build.directory}/webdriverTmp/firefox.log</webdriver.firefox.logfile>
          </systemPropertyVariables>
          <pluginArtifacts>
            <pluginArtifact>
              <groupId>com.atlassian.bamboo.plugins</groupId>
              <artifactId>atlassian-bamboo-plugin-test-utils</artifactId>
            </pluginArtifact>
           </pluginArtifacts>
          <instructions>
            <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
            <Spring-Context>*</Spring-Context>
            <Import-Package>
              *;resolution:=optional
            </Import-Package>
            <Export-Package>
              com.atlassian.bamboo.plugins.hg,
              com.atlassian.bamboo.plugins.hg.configuration
            </Export-Package>
          </instructions>
          <products>
            <product>
              <id>bamboo</id>
              <instanceId>bamboo</instanceId>
            </product>
            <product>
              <id>bamboo</id>
              <instanceId>bamboo-upgrade-from-5-12</instanceId>
              <productDataPath>${basedir}/src/test/resources/bamboo-test-resources-upgrade-from-5-12.zip</productDataPath>
            </product>
          </products>
          <testGroups>
            <testGroup>
              <id>hg-configuration-tests</id>
              <productIds>
                <productId>bamboo</productId>
              </productIds>
              <includes>
                <include>it/**/tests/configuration/*.java</include>
              </includes>
            </testGroup>
            <testGroup>
              <id>hg-upgrade-from-5-12-tests</id>
              <productIds>
                <productId>bamboo-upgrade-from-5-12</productId>
              </productIds>
              <includes>
                <include>it/**/tests/upgrade/*.java</include>
              </includes>
            </testGroup>
          </testGroups>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
