<?xml version="1.0" encoding="utf-8"?>
<!--
 ~ Copyright (c) 2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 ~
 ~ 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">

    <parent>
        <groupId>org.wso2.carbon</groupId>
        <artifactId>analytics-feature</artifactId>
        <version>4.2.0</version>
	<relativePath>../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.carbon.analytics.hive.server.feature</artifactId>
    <version>4.2.2</version>
    <packaging>pom</packaging>
    <name>WSO2 Carbon - Hive Analytics Feature</name>
    <url>http://wso2.org</url>
    <description>This feature contains the bundles required for Hive analytics</description>

    <dependencies>
        <dependency>
            <groupId>org.apache.hive.wso2</groupId>
            <artifactId>hive</artifactId>
            <version>${hive.orbit.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.hive</groupId>
                    <artifactId>hive-exec</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hive</groupId>
                    <artifactId>hive-shims</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hive</groupId>
                    <artifactId>hive-service</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hive</groupId>
                    <artifactId>hive-serde</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hive</groupId>
                    <artifactId>hive-metastore</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hive</groupId>
                    <artifactId>hive-cassandra</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hive</groupId>
                    <artifactId>hive-jdbc</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.wso2.carbon</groupId>
                    <artifactId>hive-jdbc-handler</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop.wso2</groupId>
            <artifactId>hadoop-core</artifactId>
                        <version>0.20.203.1.wso2v6</version>
                        <exclusions>
                <exclusion>
                    <groupId>org.apache.hadoop</groupId>
                    <artifactId>hadoop-core</artifactId>
                </exclusion>
                        </exclusions>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.hive.data.source.access</artifactId>
            <version>4.2.2</version>
        </dependency>
        <dependency>
            <groupId>antlr.wso2</groupId>
            <artifactId>antlr</artifactId>
            <version>${antlr.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.antlr.wso2</groupId>
            <artifactId>antlr-runtime</artifactId>
            <version>${antlr.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>asm.wso2</groupId>
            <artifactId>asm</artifactId>
            <version>${asm.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-cli.wso2</groupId>
            <artifactId>commons-cli</artifactId>
            <version>${commons.cli.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-codec.wso2</groupId>
            <artifactId>commons-codec</artifactId>
            <version>${commons.codec.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-collections.wso2</groupId>
            <artifactId>commons-collections</artifactId>
            <version>${commons.collections.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-configuration.wso2</groupId>
            <artifactId>commons-configuration</artifactId>
            <version>${commons.configuration.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-dbcp.wso2</groupId>
            <artifactId>commons-dbcp</artifactId>
            <version>${commons.dbcp.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-lang.wso2</groupId>
            <artifactId>commons-lang</artifactId>
            <version>${commons.lang.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-pool.wso2</groupId>
            <artifactId>commons-pool</artifactId>
            <version>${commons.pool.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.datanucleus.wso2</groupId>
            <artifactId>datanucleus-api-jdo</artifactId>
            <version>3.1.4.wso2v1</version>
        </dependency>
        <dependency>
            <groupId>org.datanucleus.wso2</groupId>
            <artifactId>datanucleus-core</artifactId>
            <version>3.1.5.wso2v1</version>
        </dependency>
        <dependency>
            <groupId>org.datanucleus.wso2</groupId>
            <artifactId>datanucleus-rdbms</artifactId>
            <version>3.1.5.wso2v1</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava.wso2</groupId>
            <artifactId>guava</artifactId>
            <version>${google.guava.wso2.version}</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.javaewah.wso2</groupId>
            <artifactId>JavaEWAH</artifactId>
            <version>${javaewah.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.jdo.wso2</groupId>
            <artifactId>jdo-api</artifactId>
            <version>${jdo.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.json.wso2</groupId>
            <artifactId>json</artifactId>
            <version>${json.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.thrift.wso2</groupId>
            <artifactId>libfb303</artifactId>
            <version>${libfb303.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cassandra.wso2</groupId>
            <artifactId>apache-cassandra</artifactId>
            <version>1.2.13.wso2v2</version>
        </dependency>
    </dependencies>

    <properties>
        <hive.orbit.version>0.8.1.wso2v10</hive.orbit.version>
        <antlr.orbit.version>3.2.0.wso2v1</antlr.orbit.version>
        <asm.orbit.version>3.1.wso2v1</asm.orbit.version>
        <commons.cli.orbit.version>1.2.0.wso2v1</commons.cli.orbit.version>
        <commons.codec.orbit.version>1.4.0.wso2v1</commons.codec.orbit.version>
        <commons.collections.orbit.version>3.2.0.wso2v1</commons.collections.orbit.version>
        <commons.configuration.orbit.version>1.6.0.wso2v1</commons.configuration.orbit.version>
        <commons.dbcp.orbit.version>1.4.0.wso2v1</commons.dbcp.orbit.version>
        <commons.lang.orbit.version>2.6.0.wso2v1</commons.lang.orbit.version>
        <commons.pool.orbit.version>1.5.6.wso2v1</commons.pool.orbit.version>
        <javaewah.orbit.version>0.3.2.wso2v1</javaewah.orbit.version>
        <jdo.orbit.version>3.0.0.wso2v1</jdo.orbit.version>
        <json.orbit.version>2.0.0.wso2v1</json.orbit.version>
        <libfb303.orbit.version>0.7.0.wso2v1</libfb303.orbit.version>
        <slf4j.version>1.6.1</slf4j.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>src/main/resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>resources</directory>
                                    <includes>
                                        <include>conf/hive-site.xml</include>
                                        <include>conf/hive-site-win.xml</include>
                                        <include>p2.inf</include>
                                        <include>build.properties</include>
                                    </includes>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.wso2.maven</groupId>
                <artifactId>carbon-p2-plugin</artifactId>
                <version>${carbon.p2.plugin.version}</version>
                <executions>
                    <execution>
                        <id>4-p2-feature-generation</id>
                        <phase>package</phase>
                        <goals>
                            <goal>p2-feature-gen</goal>
                        </goals>
                        <configuration>
                            <id>org.wso2.carbon.analytics.hive.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.apache.hive.wso2:hive</bundleDef>
                            </bundles>
                            <importBundles>
                                <importBundleDef>antlr.wso2:antlr</importBundleDef>
                                <importBundleDef>org.antlr.wso2:antlr-runtime</importBundleDef>
                                <importBundleDef>asm.wso2:asm</importBundleDef>
                                <importBundleDef>commons-cli.wso2:commons-cli</importBundleDef>
                                <importBundleDef>commons-codec.wso2:commons-codec</importBundleDef>
                                <importBundleDef>commons-collections.wso2:commons-collections</importBundleDef>
                                <importBundleDef>commons-configuration.wso2:commons-configuration</importBundleDef>
                                <importBundleDef>commons-dbcp.wso2:commons-dbcp</importBundleDef>
                                <importBundleDef>commons-lang.wso2:commons-lang</importBundleDef>
                                <importBundleDef>commons-pool.wso2:commons-pool</importBundleDef>
                                <importBundleDef>org.datanucleus.wso2:datanucleus-api-jdo</importBundleDef>
                                <importBundleDef>org.datanucleus.wso2:datanucleus-core</importBundleDef>
                                <importBundleDef>org.datanucleus.wso2:datanucleus-rdbms</importBundleDef>
                                <importBundleDef>com.google.guava.wso2:guava</importBundleDef>
                                <importBundleDef>com.googlecode.javaewah.wso2:JavaEWAH</importBundleDef>
                                <importBundleDef>javax.jdo.wso2:jdo-api</importBundleDef>
                                <importBundleDef>org.json.wso2:json</importBundleDef>
                                <importBundleDef>org.apache.thrift.wso2:libfb303</importBundleDef>
                                <importBundleDef>libthrift.wso2:libthrift:0.7.0.wso2v2</importBundleDef>
                                <importBundleDef>org.slf4j:slf4j-log4j12</importBundleDef>
                                <importBundleDef>org.slf4j:slf4j-api</importBundleDef>
                                <importBundelDef>org.apache.cassandra.wso2:apache-cassandra</importBundelDef>
                                <importBundleDef>org.wso2.carbon:org.wso2.carbon.hive.data.source.access</importBundleDef>
                            </importBundles>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.1</version>
                <executions>
                    <execution>
                        <id>clean resources</id>
                        <phase>install</phase>
                        <configuration>
                            <tasks>
                                <delete dir="src"/>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
