<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.bamboo</groupId>
    <artifactId>atlassian-bamboo-components</artifactId>
    <version>10.2.13</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>atlassian-bamboo-agent-elastic-server</artifactId>
  <name>Atlassian Bamboo Elastic Agent Server</name>
  <packaging>jar</packaging>

  <properties>
    <sonar.coverage.jacoco.xmlReportPaths>${project.basedir}/../../${jacoco.report.file}</sonar.coverage.jacoco.xmlReportPaths>
  </properties>

  <dependencies>

    <dependency>
      <groupId>com.atlassian.aws</groupId>
      <artifactId>atlassian-aws</artifactId>
    </dependency>

    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-agent-remote</artifactId>
    </dependency>

    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-agent-elastic</artifactId>
    </dependency>

    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-agent-elastic-shared</artifactId>
    </dependency>

    <dependency>
      <groupId>com.atlassian.tunnel</groupId>
      <artifactId>atlassian-tunnel</artifactId>
    </dependency>

    <dependency>
      <groupId>io.atlassian.util.concurrent</groupId>
      <artifactId>atlassian-util-concurrent</artifactId>
    </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-test-utils</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <scope>test</scope>
    </dependency>

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

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <excludes>
            <exclude>**/*IntegrationTest*.java</exclude>
          </excludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <configuration>
          <argLine>${addopens.failsafe}</argLine>
          <includes>
            <include>**/*IntegrationTest*.java</include>
          </includes>
          <systemPropertyVariables>
            <javax.net.ssl.keyStore>${project.build.directory}/test-classes/com/atlassian/bamboo/agent/elastic/tunnel/keystore.jks</javax.net.ssl.keyStore>
            <javax.net.ssl.keyStorePassword>changeit</javax.net.ssl.keyStorePassword>
            <javax.net.ssl.trustStore>${project.build.directory}/test-classes/com/atlassian/bamboo/agent/elastic/tunnel/truststore.jks</javax.net.ssl.trustStore>
            <com.atlassian.bamboo.agent.elastic.tunnel.pickFreePort>true</com.atlassian.bamboo.agent.elastic.tunnel.pickFreePort>
          </systemPropertyVariables>
        </configuration>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>integration-test</goal>
            </goals>
          </execution>
          <execution>
            <id>verify</id>
            <goals>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>${maven.plugins.version.maven-jar-plugin}</version>
      </plugin>
    </plugins>
  </build>
</project>
