<?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">
    <parent>
        <artifactId>analytics-processors-feature</artifactId>
        <groupId>org.wso2.carbon.analytics</groupId>
        <version>1.3.33</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.carbon.analytics.spark.server.feature</artifactId>
    <packaging>pom</packaging>
    <name>WSO2 Carbon - Analytics Spark Server Feature</name>
    <description>This feature contains the core bundles required for Spark Server functionality
    </description>

    <dependencies>
        <dependency>
            <groupId>org.wso2.carbon.analytics</groupId>
            <artifactId>org.wso2.carbon.analytics.spark.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.analytics</groupId>
            <artifactId>org.wso2.carbon.analytics.spark.admin</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.analytics</groupId>
            <artifactId>org.wso2.carbon.analytics.spark.utils</artifactId>
        </dependency>

       <!--spark -->
        <dependency>
            <groupId>org.wso2.orbit.org.apache.spark</groupId>
            <artifactId>spark-core_2.10</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.org.apache.spark</groupId>
            <artifactId>spark-sql_2.10</artifactId>
        </dependency>

        <!--spark dependencies -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
        </dependency>

        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-reflect</artifactId>
        </dependency>

        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-graphite</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-json</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-jvm</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>

        <dependency>
            <groupId>com.esotericsoftware.kryo</groupId>
            <artifactId>kryo</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wso2.orbit.com.esotericsoftware.kryo</groupId>
            <artifactId>kryo</artifactId>
        </dependency>

        <dependency>
            <groupId>org.xerial.snappy</groupId>
            <artifactId>snappy-java</artifactId>
        </dependency>

        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>compress-lzf</artifactId>
        </dependency>

        <!--wso2 orbit bundles -->
        <dependency>
            <groupId>io.netty.wso2</groupId>
            <artifactId>netty-all</artifactId>
        </dependency>

        <!--<dependency>
            <groupId>org.wso2.apache.hadoop</groupId>
            <artifactId>hadoop-client</artifactId>
        </dependency>-->
        <dependency>
            <groupId>org.wso2.orbit.org.apache.hadoop</groupId>
            <artifactId>hadoop-client</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wso2.json4s</groupId>
            <artifactId>json4s-jackson_2.10</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wso2.twitter</groupId>
            <artifactId>chill_2.10</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wso2.orbit.com.clearspring.analytics</groupId>
            <artifactId>stream</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wso2.orbit.org.apache.mesos</groupId>
            <artifactId>mesos</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
        </dependency>

        <!--child deps -->
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-continuation</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-http</artifactId>
        </dependency>
        <!--<dependency>-->
        <!--<groupId>org.eclipse.jetty</groupId>-->
        <!--<artifactId>jetty-plus</artifactId>-->
        <!--</dependency>-->
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-io</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-jndi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-security</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-util</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-webapp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-xml</artifactId>
        </dependency>

        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty</artifactId>
        </dependency>

        <dependency>
            <groupId>org.spark-project.protobuf</groupId>
            <artifactId>protobuf-java</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wso2.uncommons.maths</groupId>
            <artifactId>uncommons-maths</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.tomcat.wso2</groupId>
            <artifactId>tomcat-servlet-api</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>javax.servlet.jsp-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.roaringbitmap</groupId>
            <artifactId>RoaringBitmap</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-configuration.wso2</groupId>
            <artifactId>commons-configuration</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wso2.orbit.org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>resources</directory>
                <includes>
                    <include>p2.inf</include>
                    <include>build.properties</include>
                    <include>protobuf-java-2.5.0.jar</include>
                    <include>spark-defaults.conf</include>
                    <include>spark-udf-config.xml</include>
                    <include>external-spark-classpath.conf</include>
                    <include>carbon-spark-classpath.conf</include>
                    <include>fairscheduler.xml</include>
                    <include>log4j.properties.template</include>
                    <include>spark-jdbc-config.xml</include>
                    <include>yarn/core-site.xml</include>
                    <include>yarn/hdfs-site.xml</include>
                    <include>yarn/mapred-site.xml</include>
                    <include>yarn/yarn-site.xml</include>
                    <include>typesafe-config/reference.conf</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.wso2.maven</groupId>
                <artifactId>carbon-p2-plugin</artifactId>
                <executions>
                    <execution>
                        <id>4-p2-feature-generation</id>
                        <phase>package</phase>
                        <goals>
                            <goal>p2-feature-gen</goal>
                        </goals>
                        <configuration>
                            <id>org.wso2.carbon.analytics.spark.server</id>
                            <propertiesFile>../../etc/feature.properties</propertiesFile>
                            <adviceFile>
                                <properties>
                                    <propertyDef>org.wso2.carbon.p2.category.type:server
                                    </propertyDef>
                                    <propertyDef>org.eclipse.equinox.p2.type.group:false
                                    </propertyDef>
                                </properties>
                            </adviceFile>
                            <bundles>
                                <bundleDef>
                                    org.wso2.carbon.analytics:org.wso2.carbon.analytics.spark.core
                                </bundleDef>
                                <bundleDef>
                                    org.wso2.carbon.analytics:org.wso2.carbon.analytics.spark.admin
                                </bundleDef>
                                <bundleDef>
                                    org.wso2.carbon.analytics:org.wso2.carbon.analytics.spark.utils
                                </bundleDef>
                                <bundleDef>org.roaringbitmap:RoaringBitmap</bundleDef>
                            </bundles>
                            <importFeatures>
                                <importFeatureDef>org.wso2.carbon.core:${carbon.kernel.version}
                                </importFeatureDef>
                                <importFeatureDef>
                                    org.wso2.carbon.spark.commons:${carbon.analytics.common.version}
                                </importFeatureDef>
                            </importFeatures>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
