<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>3.4.5</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.atlassian.bamboo</groupId>
  <artifactId>atlassian-bamboo-web-app</artifactId>
  <version>3.4.5</version>

  <packaging>war</packaging>

  <name>Atlassian Bamboo Web Application</name>

  <dependencies>
    <dependency>
      <groupId>com.atlassian.sal</groupId>
      <artifactId>sal-api</artifactId>
    </dependency>

    <dependency>
      <groupId>com.atlassian.applinks</groupId>
      <artifactId>applinks-api</artifactId>
    </dependency>

    <dependency>
      <groupId>com.atlassian.applinks</groupId>
      <artifactId>applinks-host</artifactId>
    </dependency>

    <dependency>
      <groupId>com.atlassian.applinks</groupId>
      <artifactId>applinks-spi</artifactId>
    </dependency>

    <!-- Module dependencies -->
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-web</artifactId>
    </dependency>

    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-test-utils</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-plugins1-plugins</artifactId>
      <type>pom</type>
      <version>3.4.5</version>
    </dependency>

    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-agent-elastic-s3-bucket</artifactId>
      <type>aws</type>
    </dependency>

    <!-- Ensure that bundled modules aren't added twice but is still built before -->
    <dependency>
      <groupId>com.atlassian.bamboo</groupId>
      <artifactId>atlassian-bamboo-bundled-plugins</artifactId>
      <type>zip</type>
      <scope>provided</scope>
    </dependency>

    <!-- Hack for some weird mvn bug -->
    <dependency>
      <groupId>cglib</groupId>
      <artifactId>cglib-nodep</artifactId>
    </dependency>

    <!--another hack for weird mvn bug - testtools with test scope excludes this-->
    <dependency>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
    </dependency>

    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
    </dependency>

    <dependency>
      <groupId>com.atlassian.security.auth.trustedapps</groupId>
      <artifactId>atlassian-trusted-apps-core</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <!-- makes it a little easier to isloate the cause of the spring hibernate tests when they fail -->
          <forkMode>always</forkMode>
        </configuration>
      </plugin>

      <!-- Plugin for packaging the agent jars-->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>com.atlassian.bamboo</groupId>
                  <artifactId>atlassian-bamboo-agent-installer</artifactId>
                  <outputDirectory>${project.build.directory}/${project.artifactId}/admin/agent</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>com.atlassian.bamboo</groupId>
                  <artifactId>bamboo-agent</artifactId>
                  <outputDirectory>${project.build.directory}/${project.artifactId}/admin/agent</outputDirectory>
                </artifactItem>
                <artifactItem>
                  <groupId>com.atlassian.bamboo</groupId>
                  <artifactId>atlassian-bamboo-bundled-plugins</artifactId>
                  <type>zip</type>
                  <outputDirectory>${project.build.directory}/classes</outputDirectory>
                  <destFileName>atlassian-bundled-plugins.zip</destFileName>
                </artifactItem>
                <artifactItem>
                  <groupId>com.atlassian.bamboo</groupId>
                  <artifactId>atlassian-bamboo-agent-installer</artifactId>
                  <type>jar</type>
                  <outputDirectory>${project.build.directory}/classes</outputDirectory>
                  <destFileName>agent-installer.jar</destFileName>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Plugins for bundled Atlassian plugins 2.0 -->
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.0.0</version>
      </plugin>

      <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>maven-aws-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>awsinclude</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <properties>
    <pluginBundleDirectory>target/bundled-plugins</pluginBundleDirectory>
  </properties>
</project>
