<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one
  or more contributor license agreements.  See the NOTICE file
  distributed with this work for additional information
  regarding copyright ownership.  The ASF 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.
  
  $Id: pom.xml 1332500 2012-05-01 01:59:23Z mfranklin $
-->
<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.apache.rave</groupId>
        <artifactId>rave-opensocial-server</artifactId>
        <version>0.11</version>
    </parent>

    <artifactId>rave-shindig</artifactId>
    <name>Apache Rave :: rave-shindig</name>
    <description>Apache Rave Shindig App</description>
    <packaging>war</packaging>

    <properties>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.rave</groupId>
            <artifactId>rave-opensocial-core</artifactId>
            <exclusions>
                <!-- Shindig common adds jsp & el jars to the war that cause conflicts in Tomcat -->
                <exclusion>
                    <groupId>org.apache.shindig</groupId>
                    <artifactId>shindig-common</artifactId>
                </exclusion>
                <!--
                    Shindig contains JSON files with "comments" as if they were JavaScript files.
                    The JSON parser that ships with rave-core isn't as lenient as older versions and throws an exception
                    on comments.
                 -->
                <exclusion>
                    <groupId>org.json</groupId>
                    <artifactId>json</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.shindig</groupId>
            <artifactId>shindig-server</artifactId>
            <type>war</type>
        </dependency>

        <!-- log4j logging -->        
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>runtime</scope>
        </dependency>

    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-war-plugin</artifactId>
              <configuration>
                <overlays>
                  <overlay>
                    <groupId>org.apache.shindig</groupId>
                    <artifactId>shindig-server</artifactId>
                    <excludes>
                      <exclude>WEB-INF/lib/commons-logging-*.jar</exclude>
                      <exclude>WEB-INF/lib/slf4j-*.jar</exclude>
                    </excludes>
                  </overlay>
                </overlays>
              </configuration>
            </plugin>
            <plugin>
                <groupId>com.googlecode.mavenfilesync</groupId>
                <artifactId>maven-filesync-plugin</artifactId>
                <configuration>
                    <mappings>
                        <mapping>
                            <sourceFolder>src/main/webapp</sourceFolder>
                            <destinationFolder>@../rave-portal/target/tomcat6x/webapps/ROOT</destinationFolder>
                        </mapping>
                        <mapping>
                            <sourceFolder>src/main/resources</sourceFolder>
                            <destinationFolder>@../rave-portal/target/tomcat6x/webapps/ROOT/WEB-INF/classes</destinationFolder>
                        </mapping>
                    </mappings>
                </configuration>
            </plugin>
        </plugins>

    </build>

</project>
