<?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>org.terracotta</groupId>
    <artifactId>build-parent</artifactId>
    <version>3.6.5</version>
    <relativePath>../build-parent</relativePath>
  </parent>

  <groupId>org.terracotta.api</groupId>
  <artifactId>test-api</artifactId>
  <packaging>jar</packaging>
  <name>test-api</name>

  <properties>
    <skip.findbugs>true</skip.findbugs>
  </properties>

  <dependencies>
    <!-- Version and scope for each dependency is declared in the dependencyManagement 
      section of the parent POM. -->
    <dependency>
      <groupId>org.terracotta</groupId>
      <artifactId>linked-child-process</artifactId>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-cli</groupId>
      <artifactId>commons-cli</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
    </dependency>
    <dependency>
      <groupId>javax.management</groupId>
      <artifactId>jmxremote</artifactId>
    </dependency>
    <dependency>
      <groupId>org.terracotta</groupId>
      <artifactId>jmxremote_optional-tc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.beanshell</groupId>
      <artifactId>bsh</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlbeans</groupId>
      <artifactId>xmlbeans</artifactId>
      <exclusions>
        <exclusion>
          <groupId>stax</groupId>
          <artifactId>stax-api</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.xmlbeans</groupId>
      <artifactId>xmlbeans-jsr173-api</artifactId>
    </dependency>
    <dependency>
      <groupId>knopflerfish-tc</groupId>
      <artifactId>knopflerfish-tc</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>servlet-api-2.5</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-util</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
    </dependency>
    <dependency>
      <groupId>concurrent</groupId>
      <artifactId>concurrent</artifactId>
    </dependency>
    <dependency>
      <groupId>trove</groupId>
      <artifactId>trove</artifactId>
    </dependency>
    <dependency>
      <groupId>com.sleepycat</groupId>
      <artifactId>je</artifactId>
    </dependency>
    <dependency>
      <groupId>jline</groupId>
      <artifactId>jline</artifactId>
    </dependency>
    <dependency>
      <groupId>jfree</groupId>
      <artifactId>jfreechart</artifactId>
    </dependency>
    <dependency>
      <groupId>treemap</groupId>
      <artifactId>treemap</artifactId>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
    </dependency>
    <dependency>
      <groupId>hsqldb</groupId>
      <artifactId>hsqldb</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.ant</groupId>
      <artifactId>ant</artifactId>
    </dependency>
    <dependency>
      <groupId>httpunit</groupId>
      <artifactId>httpunit</artifactId>
    </dependency>

    <!-- for packaging purpose -->
    <dependency>
      <groupId>org.terracotta.internal</groupId>
      <artifactId>common</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.terracotta.internal</groupId>
      <artifactId>dso-l1</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>    
    <dependency>
      <groupId>org.terracotta.internal</groupId>
      <artifactId>simulator</artifactId>
      <version>${project.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.terracotta.internal</groupId>
      <artifactId>simulator</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.terracotta.test</groupId>
      <artifactId>legacy-test-tree</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.terracotta.test</groupId>
      <artifactId>dso-system-tests</artifactId>
      <version>${project.version}</version>
      <type>test-jar</type>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.terracotta</groupId>
        <artifactId>maven-forge-plugin</artifactId>
        <configuration>
          <rootPath>${basedir}/..</rootPath>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>manifest</goal>
            </goals>
            <phase>generate-resources</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.2</version>
        <executions>
          <execution>
            <id>unpack-dependencies</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <configuration>
              <overwrite>false</overwrite>
              <includeGroupIds>org.terracotta.internal,org.terracotta.test</includeGroupIds>
              <classifier>tests</classifier>
              <includes>**/*.class</includes>
              <excludes>tim-get.properties,**/**TestApp*.class,**/**Test$*class</excludes>
              <outputDirectory>${project.build.outputDirectory}</outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>unpack-sources</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <configuration>
              <overwrite>false</overwrite>
              <includeGroupIds>org.terracotta.internal,org.terracotta.test</includeGroupIds>
              <classifier>test-sources</classifier>
              <excludes>tim-get.properties,**/**TestApp.java</excludes>
              <outputDirectory>${project.build.directory}/sources</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.github.goldin</groupId>
        <artifactId>copy-maven-plugin</artifactId>
        <version>${copy-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>create-source-archive</id>
            <phase>package</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <resource>
                <targetPath>${project.build.directory}/${project.artifactId}-${project.version}-sources.jar</targetPath>
                <directory>${project.build.directory}/sources</directory>
                <pack>true</pack>
                <attachArtifact>false</attachArtifact>
              </resource>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.directory}/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
