<?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.
  -->

<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.falcon</groupId>
        <artifactId>falcon-main</artifactId>
        <version>0.8</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>falcon-prism</artifactId>
    <description>Apache Falcon Prism</description>
    <name>Apache Falcon Prism</name>
    <packaging>war</packaging>

    <profiles>
        <profile>
            <id>hadoop-2</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.apache.hadoop</groupId>
                    <artifactId>hadoop-client</artifactId>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>org.apache.falcon</groupId>
            <artifactId>falcon-common</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.falcon</groupId>
            <artifactId>falcon-common</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet.jsp</groupId>
                    <artifactId>jsp-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.falcon</groupId>
            <artifactId>falcon-test-util</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.falcon</groupId>
            <artifactId>falcon-client</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.falcon</groupId>
            <artifactId>falcon-oozie-adaptor</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.falcon</groupId>
            <artifactId>falcon-retention</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.falcon</groupId>
            <artifactId>falcon-metrics</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.falcon</groupId>
            <artifactId>falcon-rerun</artifactId>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-server</artifactId>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
        </dependency>

        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-json</artifactId>
        </dependency>

        <dependency>
            <groupId>com.googlecode.json-simple</groupId>
            <artifactId>json-simple</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>jetty-plus</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
        </dependency>

        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-net</groupId>
            <artifactId>commons-net</artifactId>
        </dependency>

        <dependency>
            <groupId>com.icegreen</groupId>
            <artifactId>greenmail</artifactId>
            <version>1.4.1</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <packagingExcludes>docs/downloads.html</packagingExcludes>
                    <webResources>
                        <resource>
                            <directory>../html5-ui</directory>
			            </resource>
                        <resource>
                            <directory>target/restapi</directory>
                        </resource>
                    </webResources>
                    <attachClasses>true</attachClasses>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>keytool-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-resources</phase>
                        <id>clean-server</id>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                    <execution>
                        <phase>generate-resources</phase>
                        <id>server</id>
                        <goals>
                            <goal>generateKeyPair</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <dname>cn=falcon.apache.org</dname>
                    <keystore>${project.build.directory}/prism.keystore</keystore>
                    <keypass>falcon-prism-passwd</keypass>
                    <storepass>falcon-prism-passwd</storepass>
                    <alias>prism</alias>
                    <keyalg>RSA</keyalg>
                    <validity>100000</validity>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.7</version>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>1.8.6</version>
                    </dependency>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <version>1.8.6</version>
                    </dependency>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>1.8.6</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <verbose>true</verbose>
                    <source>1.7</source>
                    <target>1.7</target>
                    <complianceLevel>1.7</complianceLevel>
                    <includes>
                        <include>org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java</include>
                        <include>org/apache/falcon/resource/proxy/InstanceManagerProxy.java</include>
                        <include>org/apache/falcon/resource/AbstractInstanceManager.java</include>
                        <include>org/apache/falcon/plugin/ChainableMonitoringPlugin.java</include>
                        <include>org/apache/falcon/plugin/ChainableMonitoringPluginTest.java</include>
                        <include>org/apache/falcon/aspect/GenericAlert.java</include>
                        <include>org/apache/falcon/aspect/GenericAlertTest.java</include>
                    </includes>
                    <weaveDependencies>
                        <weaveDependency>
                            <groupId>org.apache.falcon</groupId>
                            <artifactId>falcon-rerun</artifactId>
                        </weaveDependency>
                        <weaveDependency>
                            <groupId>org.apache.falcon</groupId>
                            <artifactId>falcon-metrics</artifactId>
                        </weaveDependency>
                    </weaveDependencies>
                    <Xlint>warning</Xlint>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.enunciate</groupId>
                <artifactId>maven-enunciate-plugin</artifactId>
                <version>1.30.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>docs</goal>
                        </goals>
                        <configuration>
                            <configFile>enunciate.xml</configFile>
                            <!-- the directory where to put the docs -->
                            <docsDir>${project.build.directory}/restapi/docs</docsDir>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
