<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.atlassian.shindig</groupId>
        <artifactId>shindig-parent</artifactId>
        <version>2.2.1</version>
    </parent>

    <artifactId>shindig-gadgets</artifactId>
    <packaging>jar</packaging>

    <name>Apache Shindig Gadget Renderer</name>
    <description>Renders gadgets, provides the gadget metadata service, and serves
        all javascript required by the OpenSocial specification.
    </description>

    <dependencies>
        <!-- project dependencies -->
        <dependency>
            <groupId>com.atlassian.shindig</groupId>
            <artifactId>shindig-common</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.shindig</groupId>
            <artifactId>shindig-common</artifactId>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <!--
          external dependencies
          where the depedency version is defined in dependency Management,
          there is no need for the version, and it should not be put in
          so we have a single place to change the version
        -->
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
        </dependency>
        <dependency>
            <groupId>caja</groupId>
            <artifactId>caja</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>caja</groupId>
            <artifactId>json_simple</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>net.oauth.core</groupId>
            <artifactId>oauth</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
        </dependency>
        <dependency>
            <groupId>aopalliance</groupId>
            <artifactId>aopalliance</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>rome</groupId>
            <artifactId>rome</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ibm.icu</groupId>
            <artifactId>icu4j</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.nekohtml</groupId>
            <artifactId>nekohtml</artifactId>
        </dependency>
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-nop</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <!-- duplicated here for the jar build. -->
                <!-- this is relative to the pom.xml directory -->
                <directory>../javascript</directory>
                <targetPath>files</targetPath>
                <includes>
                    <include>**/*.*</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <webResources>
                        <resource>
                            <!-- this is relative to the pom.xml directory -->
                            <directory>${basedir}/../../javascript/</directory>
                            <targetPath>files</targetPath>
                            <includes>
                                <include>**/*.*</include>
                            </includes>
                        </resource>
                    </webResources>
                </configuration>
                <executions>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArguments>
                        <!-- A common distribution of hamcrest library includes .java files that are newer than the corresponding .class files.  Because sourcepath defaults to classpath, if we do not set this, then we end up with some of hamcrest's classes in our jar.  This is silly and not what we want, so we explicitly set sourcepath to something that is not a directory.  If you have a directory on your machine that is called /not_a_directory and contains .java files that are newer than .class files with a similar name that are imported by our code, then you will probably experience trouble. -->
                        <sourcepath>/not_a_directory</sourcepath>
                    </compilerArguments>
                    <fork>true</fork>
                    <source>8</source>
                    <target>8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
