<?xml version="1.0" encoding="UTF-8"?>
<!--

  All content copyright (c) 2003-2008 Terracotta, Inc.,
  except as may otherwise be noted in a separate copyright notice.
  All rights reserved.

-->
<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.forge</groupId>
    <artifactId>forge-parent</artifactId>
    <version>1.0.12</version>
  </parent>

  <groupId>org.terracotta.forge</groupId>
  <artifactId>tim-parent</artifactId>
  <version>1.1.2</version>
  <packaging>pom</packaging>

  <name>TIM Parent</name>
  <description>Parent POM for Terracotta config modules</description>

  <properties>
    <forgeTags>Parent POM</forgeTags>
    <tc.version>2.6.2</tc.version>
    <tc.config>tc-config.xml</tc.config>
    <tc.bootjar>${project.build.directory}/dso-boot.jar</tc.bootjar>
    <bootclasspath>${tc.bootjar}</bootclasspath>
    <tc.tests.info.l2.startup.mode>internal</tc.tests.info.l2.startup.mode>
    <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment>
    <tc.tests.info.junit-test-timeout-inseconds>900</tc.tests.info.junit-test-timeout-inseconds>
    <surefire.version>2.3</surefire.version>
    <surefire.argLine>-Xbootclasspath/p:${bootclasspath} -Dtc.base-dir=${project.build.directory} -Dtc.config=${tc.config} -Dcom.tc.l1.modules.repositories=file://${settings.localRepository} -Dtc.dso.globalmode=false -Dtc.tests.info.l2.startup.mode=${tc.tests.info.l2.startup.mode} -Dtc.tests.info.bootjars.normal=${tc.bootjar} -Dtc.tests.info.junit-test-timeout-inseconds=${tc.tests.info.junit-test-timeout-inseconds}</surefire.argLine>
  </properties>

  <scm>
    <connection>scm:svn:http://svn.terracotta.org/svn/forge/projects/tim-parent/tags/release-1.1.2</connection>
    <developerConnection>scm:svn:https://svn.terracotta.org/repo/forge/projects/tim-parent/tags/release-1.1.2</developerConnection>
    <url>http://svn.terracotta.org/svn/forge/projects/tim-parent/tags/release-1.1.2</url>
  </scm>

  <profiles>
    <profile>
      <id>workaround-windows-spaces</id>
      <properties>
        <surefire.argLine>-Xbootclasspath/p:'${bootclasspath}' -Dtc.base-dir='${project.build.directory}' -Dtc.config='${tc.config}' -Dcom.tc.l1.modules.repositories='file://${settings.localRepository}' -Dtc.dso.globalmode=false -Dtc.tests.info.l2.startup.mode=${tc.tests.info.l2.startup.mode} -Dtc.tests.info.bootjars.normal='${tc.bootjar}'</surefire.argLine>
      </properties>
      <activation>
        <os>
          <family>windows</family>
        </os>
      </activation>
    </profile>
    <profile>
      <id>snapshot</id>
      <distributionManagement>
        <site>
          <id>forge-site</id>
          <name>Project Sites Server</name>
          <url>${tc.distributionManagement.site.url}</url>
        </site>
      </distributionManagement>
    </profile>
    <profile>
      <id>release</id>
      <distributionManagement>
        <site>
          <id>forge-site</id>
          <name>Project Sites Server</name>
          <url>${tc.distributionManagement.site.url}</url>
        </site>
      </distributionManagement>
    </profile>
  </profiles>

  <dependencies>
    <dependency>
      <groupId>org.terracotta.modules</groupId>
      <artifactId>modules-common</artifactId>
      <version>${tc.version}</version>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>src/test/resources</directory>
        <filtering>true</filtering>
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.terracotta.maven.plugins</groupId>
          <artifactId>tc-maven-plugin</artifactId>
          <version>1.1.2</version>
          <configuration>
            <startServer>false</startServer>
            <workingDirectory>${project.build.directory}</workingDirectory>
            <numberOfNodes>1</numberOfNodes>
            <overwriteBootjar>true</overwriteBootjar>
            <config>${tc.config}</config>
          </configuration>
          <executions>
            <execution>
              <phase>generate-resources</phase>
              <goals>
                <goal>manifest</goal>
              </goals>
              <configuration>
                <bundleRequiredExecutionEnvironment>${Bundle-RequiredExecutionEnvironment}</bundleRequiredExecutionEnvironment>
                <bundleCategory>Terracotta Integration Module</bundleCategory>
                <bundleCopyright>Copyright (c) 2007 Terracotta, Inc.</bundleCopyright>
                <importPackage>org.terracotta.modules.configuration</importPackage>
              </configuration>
            </execution>
          </executions>
          <dependencies>
            <dependency>
              <groupId>org.terracotta</groupId>
              <artifactId>terracotta</artifactId>
              <version>${tc.version}</version>
            </dependency>
            <dependency>
              <groupId>org.terracotta</groupId>
              <artifactId>tcconfig</artifactId>
              <version>${tc.version}</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <source>1.5</source>
            <target>1.5</target>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefire.version}</version>
          <configuration>
            <forkMode>always</forkMode>
            <forkedProcessTimeoutInSeconds>${tc.tests.info.junit-test-timeout-inseconds}</forkedProcessTimeoutInSeconds>
            <useSystemClassLoader>true</useSystemClassLoader>
            <argLine>${surefire.argLine}</argLine>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <executions>
            <execution>
              <id>default</id>
              <goals>
                <goal>jar</goal>
              </goals>
              <configuration>
                <forceCreation>true</forceCreation>
                <archive>
                  <manifestFile>${project.build.directory}/MANIFEST.MF</manifestFile>
                </archive>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.terracotta.maven.plugins</groupId>
        <artifactId>tc-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>
    </plugins>
  </build>

  <repositories>
    <repository>
      <id>terracotta-repository</id>
      <url>http://www.terracotta.org/download/reflector/maven2</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>terracotta-repository</id>
      <url>http://www.terracotta.org/download/reflector/maven2</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>
</project>
