<?xml version="1.0"?>
<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>com.terracotta</groupId>
    <artifactId>management-parent</artifactId>
    <version>1.0.6</version>
    <relativePath>..</relativePath>
  </parent>
  
  <groupId>com.terracotta</groupId>
  <artifactId>tmc-slash-war</artifactId>
  <packaging>war</packaging>
  <version>1.0.6</version>
  <name>tmc-slash-war</name>
  <description>A web application that can be deployed at the root context of a java ee server, which redircts to the 'tmc' context.</description>

  <profiles>
    <profile>
      <id>dev</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <resources>
          <resource>
            <directory>src/main/resources</directory>
          </resource>
          <resource>
            <directory>src/main/resources/dev</directory>
          </resource>
        </resources>
      </build>
    </profile>
    <profile>
      <id>release</id>
      <build>
        <resources>
          <resource>
            <directory>src/main/resources</directory>
          </resource>
          <resource>
            <directory>src/main/resources/release</directory>
          </resource>
        </resources>
      </build>
    </profile>
  </profiles>

  <dependencies>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>2.5</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>${slashWarFinalName}</finalName>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${jetty.version}</version>
        <configuration>
          <connectors>
            <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
              <forwarded>true</forwarded>
              <port>9889</port>
            </connector>
          </connectors>
          <webApp>
            <contextPath>/</contextPath>
            <!-- This flips useFileMappedBuffer to false. File extracted from jetty-webapp-7.6.3.v20120416.jar -->
            <!-- http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows -->
            <defaultsDescriptor>${basedir}/src/jetty/webdefault.xml</defaultsDescriptor>
          </webApp>
        </configuration>
      </plugin>
      <plugin>
      	<groupId>org.kohsuke.jetty</groupId>
      	<artifactId>jetty-maven-plugin</artifactId>
      	<version>7.0.0pre1</version>
      </plugin>
    </plugins>
  </build>
</project>
