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

  <groupId>com.atlassian.bamboo</groupId>
  <artifactId>atlassian-bamboo-agent-classpath</artifactId>
  <version>2.0-DR3</version>

  <parent>
    <groupId>com.atlassian.bamboo</groupId>
    <artifactId>atlassian-bamboo</artifactId>
    <version>2.0-DR3</version>
  </parent>

  <packaging>jar</packaging>

  <name>Atlassian Bamboo Agent Class Path</name>

  <build>
    <plugins>

      <!-- Workaround for http://jira.codehaus.org/browse/MDEP-119 -->
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>resources</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>build-classpath</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>build-classpath</goal>
            </goals>
            <configuration>
              <cpFile>${project.build.outputDirectory}/com/atlassian/bamboo/agent/classpath/classpath.txt</cpFile>
              <prefix>.</prefix>
            </configuration>
          </execution>
          <execution>
            <id>copy-agent-classpath-jars</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.outputDirectory}/com/atlassian/bamboo/agent/classpath</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <dependencies>

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

  </dependencies>

</project>
