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

  <parent>
    <groupId>com.atlassian.pom</groupId>
    <artifactId>public-pom</artifactId>
    <version>3.0.42</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <groupId>com.atlassian.bamboo.plugins</groupId>
  <artifactId>bamboo-scp-plugin</artifactId>
  <version>5.8.4</version>

  <name>Bamboo SCP and SSH Tasks</name>
  <packaging>atlassian-plugin</packaging>

  <scm>
    <connection>scm:hg:ssh://hg@bitbucket.org/atlassian/bamboo-scp-plugin</connection>
    <developerConnection>scm:hg:ssh://hg@bitbucket.org/atlassian/bamboo-scp-plugin</developerConnection>
    <url>https://bitbucket.org/atlassian/bamboo-scp-plugin/src</url>
    <tag>bamboo-scp-plugin-5.8.4</tag>
  </scm>

  <properties>
    <bamboo.version>5.8-m1</bamboo.version>
    <bamboo.data.version>3.2.2</bamboo.data.version>
    <jdkLevel>1.6</jdkLevel>
    <sshj.version>0.10.0-maven2-3</sshj.version>
    <amps.version>4.2.20</amps.version>
    <salVersion>2.10.15</salVersion>
    <failOnMilestoneOrReleaseCandidateDeps>false</failOnMilestoneOrReleaseCandidateDeps>
  </properties>

  <dependencies>
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-web</artifactId>
      <version>${bamboo.version}</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>bouncycastle</groupId>
          <artifactId>bcprov-jdk14</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.bouncycastle</groupId>
          <artifactId>bcprov-jdk15</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.bouncycastle</groupId>
          <artifactId>bcprov-jdk16</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.bouncycastle</groupId>
          <artifactId>bcmail-jdk15</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-core</artifactId>
      <version>${bamboo.version}</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>com.jcraft</groupId>
          <artifactId>jsch</artifactId>
        </exclusion>
        <exclusion>
          <groupId>bouncycastle</groupId>
          <artifactId>bcprov-jdk14</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.bouncycastle</groupId>
          <artifactId>bcprov-jdk15</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.bouncycastle</groupId>
          <artifactId>bcmail-jdk15</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.bouncycastle</groupId>
          <artifactId>bcprov-jdk15on</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>com.atlassian.sal</groupId>
      <artifactId>sal-api</artifactId>
      <version>${salVersion}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>net.schmizz</groupId>
      <artifactId>sshj</artifactId>
      <version>${sshj.version}</version>
      <exclusions>
        <exclusion>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.bouncycastle</groupId>
          <artifactId>bcpkix-jdk15on</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.atlassian.testtools</groupId>
      <artifactId>atlassian-testtools</artifactId>
      <version>1.8</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-test-utils</artifactId>
      <version>${bamboo.version}</version>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>com.google.collections</groupId>
          <artifactId>google-collections</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.bouncycastle</groupId>
          <artifactId>bcprov-jdk16</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>maven-bamboo-plugin</artifactId>
        <version>${amps.version}</version>
        <extensions>true</extensions>
        <configuration>
          <extractDependencies>false</extractDependencies>
          <productVersion>${bamboo.version}</productVersion>
          <productDataVersion>${bamboo.data.version}</productDataVersion>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes combine.children="append">
            <exclude>**/TestScp.java</exclude>
            <exclude>**/TestSsh.java</exclude>
          </excludes>
        </configuration>
      </plugin>

      <!-- Someone put this in AMPS without setting a version. -->
      <plugin>
        <groupId>org.twdata.maven</groupId>
        <artifactId>cargo-maven2-plugin</artifactId>
        <version>1.0-beta-2-db2</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.2</version>
        <executions>
          <execution>
            <id>ban_google_collections</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <phase>validate</phase>
            <configuration>
              <rules>
                <bannedDependencies>
                  <searchTransitive>true</searchTransitive>
                  <message>Use guava, not google-collections</message>
                  <excludes>
                    <exclude>com.google.collections:google-collections</exclude>
                    <exclude>com.atlassian.bundles:google-collections</exclude>
                  </excludes>
                </bannedDependencies>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>
</project>
