<!--
  ~ Copyright 2010 Red Hat, Inc.
  ~
  ~  Red Hat licenses this file to you under the Apache License, version
  ~  2.0 (the "License"); you may not use this file except in compliance
  ~  with the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~  Unless required by applicable law or agreed to in writing, software
  ~  distributed under the License is distributed on an "AS IS" BASIS,
  ~  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  ~  implied.  See the License for the specific language governing
  ~  permissions and limitations under the License.
  -->
<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.fusesource.fmc</groupId>
    <artifactId>fmc-scala</artifactId>
    <version>1.0.2.fuse-097</version>
    <relativePath>../fmc-scala</relativePath>
  </parent>

  <artifactId>fmc-docs</artifactId>
  <name>${project.artifactId}</name>
  <packaging>war</packaging>

  <dependencies>
    <dependency>
      <groupId>org.fusesource.scalate</groupId>
      <artifactId>scalate-page</artifactId>
      <version>${scalate-version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
      </plugin>

      <plugin>
        <groupId>org.fusesource.scalate</groupId>
        <artifactId>maven-scalate-plugin</artifactId>
        <version>${scalate-version}</version>
        <configuration>
          <remoteServerId>website.fusesource.org</remoteServerId>
          <remoteServerUrl>dav:http://fusesource.com/forge/dav/${forge-project-id}/versions/snapshot/docs
          </remoteServerUrl>
        </configuration>
        <executions>
          <execution>
            <id>sitegen</id>
            <goals>
              <goal>sitegen</goal>
            </goals>
            <phase>package</phase>
            <configuration>
              <warSourceDirectory>${project.build.directory}/webapp</warSourceDirectory>
            </configuration>
          </execution>
          <execution>
            <id>deploy</id>
            <goals>
              <goal>deploy</goal>
            </goals>
            <phase>deploy</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${jetty-plugin-version}</version>
        <configuration>
          <webAppConfig>
            <contextPath>/</contextPath>
            <resourceBase>${project.basedir}/src/main/webapp</resourceBase>
          </webAppConfig>

          <systemProperties>
            <!-- enable easy JMX connection to JConsole -->
            <systemProperty>
              <name>com.sun.management.jmxremote</name>
              <value />
            </systemProperty>
            <systemProperty>
              <name>scalate.editor</name>
              <value>${scalate.editor}</value>
            </systemProperty>
            <systemProperty>
              <name>scalate.workdir</name>
              <value>${scalate.workdir}</value>
            </systemProperty>
            <systemProperty>
              <name>scalate.mode</name>
              <value>${scalate.mode}</value>
            </systemProperty>
          </systemProperties>
          <scanIntervalSeconds>0</scanIntervalSeconds>
        </configuration>
      </plugin>

    </plugins>
  </build>

</project>
