<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright (C) FuseSource, Inc.
  http://fusesource.com

  Licensed 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>org.fusesource</groupId>
    <artifactId>fuse-project</artifactId>
    <version>7.3.0.redhat-SNAPSHOT</version>
    <relativePath>../parent</relativePath>
  </parent>

  <artifactId>website</artifactId>
  <packaging>war</packaging>

  <name>[TODO]${project.artifactId}</name>
  <description>Fuse Stack :: Website and Documentation</description>

  <properties>
    <netbeans.hint.deploy.server>Tomcat60</netbeans.hint.deploy.server>
    <wikitext-version>1.3</wikitext-version>
  </properties>

  <dependencies>

    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
      <version>${servlet-api-version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.fusesource.wikitext</groupId>
      <artifactId>confluence-core</artifactId>
      <version>${wikitext-version}</version>
    </dependency>

    <dependency>
      <groupId>org.fusesource.wikitext</groupId>
      <artifactId>textile-core</artifactId>
      <version>${wikitext-version}</version>
    </dependency>

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

    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-compiler</artifactId>
      <version>${scala-version}</version>
    </dependency>

    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback-version}</version>
    </dependency>

  </dependencies>

  <build>
    <sourceDirectory>${basedir}/ext</sourceDirectory>

    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>${wagon-webdav-plugin-version}</version>
      </extension>
    </extensions>

    <plugins>
      <plugin>
        <inherited>true</inherited>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.scala-tools</groupId>
        <artifactId>maven-scala-plugin</artifactId>
        <version>${scala-plugin-version}</version>
        <executions>
          <execution>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <!-- lets disable vscaladoc -->
          <scaladocClassName>scala.tools.nsc.ScalaDoc</scaladocClassName>
          <!--
                      <scalaJars>
                        <scalaJar>
                          <groupId>org.scala-lang</groupId>
                          <artifactId>scala-compiler</artifactId>
                          <version>${scala-version}</version>
                        </scalaJar>
                      </scalaJars>
          -->
          <jvmArgs>
            <jvmArg>-Xmx1024m</jvmArg>
          </jvmArgs>
          <args>
            <!-- arg>-unchecked</arg -->
            <arg>-deprecation</arg>
          </args>
          <scalaVersion>${scala-version}</scalaVersion>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>cmdhelp-maven-plugin</artifactId>
        <version>${karaf-version}</version>
        <executions>
          <execution>
            <id>generate-commands</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>cmdhelp</goal>
            </goals>
            <configuration>
              <format>conf</format>
              <targetFolder>src/fabric/docs/commands/</targetFolder>
              <classLoader>plugin</classLoader>
            </configuration>
          </execution>
        </executions>
        <dependencies>
          <!-- Commands for help generation -->
          <dependency>
            <groupId>org.fusesource.fabric</groupId>
            <artifactId>fabric-core</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>org.fusesource.fabric</groupId>
            <artifactId>fabric-api</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>org.fusesource.fabric</groupId>
            <artifactId>fabric-zookeeper</artifactId>
            <version>${project.version}</version>
          </dependency>
          <dependency>
            <groupId>org.fusesource.fabric</groupId>
            <artifactId>fabric-commands</artifactId>
            <version>${project.version}</version>
            <exclusions>
              <exclusion>
                <groupId>org.apache.karaf.shell</groupId>
                <artifactId>org.apache.karaf.shell.obr</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
            <dependency>
                <groupId>org.fusesource.fabric</groupId>
                <artifactId>fabric-boot-commands</artifactId>
                <version>${project.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.apache.karaf.shell</groupId>
                        <artifactId>org.apache.karaf.shell.obr</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.fusesource.fabric</groupId>
                <artifactId>fabric-zookeeper-commands</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.fusesource.fabric</groupId>
                <artifactId>fabric-core-agent-jclouds</artifactId>
                <version>${project.version}</version>
            </dependency>
          <dependency>
            <groupId>org.fusesource.fabric.fab</groupId>
            <artifactId>fab-osgi</artifactId>
            <version>${project.version}</version>
            <exclusions>
              <exclusion>
                <groupId>org.apache.karaf.shell</groupId>
                <artifactId>org.apache.karaf.shell.obr</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>org.fusesource.scalate</groupId>
        <artifactId>maven-scalate-plugin</artifactId>
        <version>${scalate-version}</version>
        <configuration>
          <warSourceDirectory>${basedir}/src</warSourceDirectory>
          <remoteServerId>website.fusesource.org</remoteServerId>
          <remoteServerUrl>dav:http://fusesource.com/forge/dav/fuse</remoteServerUrl>
          <!-- 
          <remoteServerUrl>dav:http://fusesource.com/forge/dav/${forge-project-id}/fab</remoteServerUrl>

          <remoteServerUrl>scp://repo.fusesource.com/www/repo.fusesource.com/fab</remoteServerUrl>
          <remoteServerUrl>dav:http://fusesource.com/forge/dav/${forge-project-id}</remoteServerUrl>
          -->
          <!--
          <remoteServerUrl>dav:http://fusesource.com/forge/dav/${forge-project-id}/versions/${scalate-version}</remoteServerUrl>
          <remoteServerUrl>dav:http://fusesource.com/forge/dav/${forge-project-id}/versions/snapshot</remoteServerUrl> 
          -->
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.fusesource.wikitext</groupId>
            <artifactId>confluence-core</artifactId>
            <version>${wikitext-version}</version>
          </dependency>

          <dependency>
            <groupId>org.fusesource.wikitext</groupId>
            <artifactId>textile-core</artifactId>
            <version>${wikitext-version}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>sitegen</id>
            <goals>
              <goal>sitegen</goal>
            </goals>
            <phase>package</phase>
          </execution>
          <execution>
            <id>deploy</id>
            <goals>
              <goal>deploy</goal>
            </goals>
            <phase>deploy</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <version>${war-plugin-version}</version>
        <configuration>
          <warSourceDirectory>${basedir}/src</warSourceDirectory>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${jetty-plugin-version}</version>
        <configuration>
          <webAppConfig>
            <contextPath>/</contextPath>
            <resourceBase>${basedir}/src</resourceBase>
            <unpackOverlays>false</unpackOverlays>
          </webAppConfig>
          <webAppSourceDirectory>${basedir}/src</webAppSourceDirectory>
          <systemProperties>
            <systemProperty>
              <name>scalate.editor</name>
              <value>${env.SCALATE_EDITOR}</value>
            </systemProperty>
            <systemProperty>
              <name>scalate.workdir</name>
              <value>${basedir}/target/scalate</value>
            </systemProperty>
            <systemProperty>
              <name>scalate.mode</name>
              <value>development</value>
            </systemProperty>
          </systemProperties>
          <scanIntervalSeconds>0</scanIntervalSeconds>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.fusesource.mvnplugins</groupId>
        <artifactId>maven-linkchecker-plugin</artifactId>
        <version>${mvnplugins-version}</version>
        <configuration>
          <excludedLinks>
            <value>http://github.com/</value>
            <value>http://git.or.cz/</value>
            <value>http://localhost:8080/</value>
            <value>http://repo.fusesource.com/</value>
            <value>http://search.twitter.com/</value>
            <value>http://www.chengin.com/</value>
          </excludedLinks>
        </configuration>
      </plugin>
    </plugins>
  </reporting>
</project>

