<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2015, 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/xsd/maven-4.0.0.xsd">

    <groupId>org.wso2.analytics.apim</groupId>
    <version>2.5.0.Beta</version>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.cep.storm.dependencies</artifactId>
    <name>WSO2 Analytics for APIM - Storm Dependencies Jar</name>
    <packaging>jar</packaging>

    <!--
        To add additional dependencies to the storm jar and deploy within the Storm cluster, follow the steps mentioned
        below.
        1. Add the dependency maven artifact information to the dependencies section of the pom.
    -->
    <dependencies>
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-core</artifactId>
            <version>${siddhi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-query-api</artifactId>
            <version>${siddhi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-query-compiler</artifactId>
            <version>${siddhi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.analytics-common</groupId>
            <artifactId>org.wso2.carbon.event.processor.manager.commons</artifactId>
            <version>${carbon.analytics.common.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.analytics-common</groupId>
            <artifactId>org.wso2.carbon.event.processor.manager.core</artifactId>
            <version>${carbon.analytics.common.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.event-processing</groupId>
            <artifactId>org.wso2.carbon.event.processor.common</artifactId>
            <version>${carbon.event.processing.version}</version>
        </dependency>
        <dependency>
            <groupId>libthrift.wso2</groupId>
            <artifactId>libthrift</artifactId>
            <version>${libthrift.wso2.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.com.lmax</groupId>
            <artifactId>disruptor</artifactId>
            <version>${disruptor.orbit.version}</version>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>antlr4-runtime</artifactId>
            <version>${antlr.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler.wso2</groupId>
            <artifactId>quartz</artifactId>
            <version>${quartz.version}</version>
        </dependency>

        <!--siddhi extension with dependencies-->

        <!-- Siddhi Math extension-->
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-extension-math</artifactId>
            <version>${siddhi.version}</version>
        </dependency>

        <!-- Siddhi Regex extension -->
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-extension-regex</artifactId>
            <version>${siddhi.version}</version>
        </dependency>

        <!-- Siddhi String extension -->
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-extension-string</artifactId>
            <version>${siddhi.version}</version>
        </dependency>

        <!-- Siddhi Event Table extension -->
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-extension-event-table</artifactId>
            <version>${siddhi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-common</artifactId>
            <version>${hadoop.common.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat.wso2</groupId>
            <artifactId>jdbc-pool</artifactId>
            <version>${jdbc-pool.version}</version>
        </dependency>

        <!-- Siddhi Time extension -->
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-extension-time</artifactId>
            <version>${siddhi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons-lang3.version}</version>
        </dependency>

        <!-- Siddhi Time-Series extension -->
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-extension-timeseries</artifactId>
            <version>${siddhi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-math3</artifactId>
            <version>${commons-math3.version}</version>
        </dependency>

        <!-- Siddhi Geo extension -->
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-extension-geo</artifactId>
            <version>${siddhi.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.servicemix.bundles</groupId>
            <artifactId>org.apache.servicemix.bundles.geocoder-java</artifactId>
            <version>${geocoder.version}</version>
        </dependency>

        <!-- Siddhi Eval-Script extension -->
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-extension-eval-script</artifactId>
            <version>${siddhi.version}</version>
        </dependency>
        <dependency>
            <groupId>com.googlecode.scalascriptengine</groupId>
            <artifactId>scalascriptengine_2.11</artifactId>
            <version>${scalascriptengine.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-compiler</artifactId>
            <version>${scala.version}</version>
        </dependency>
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-reflect</artifactId>
            <version>${scala.version}</version>
        </dependency>

        <!-- Uncomment the following depedency section if you want to include Siddhi ML extension as part of
            Storm dependencies -->
        <!--<dependency>-->
        <!--<groupId>org.wso2.carbon.ml</groupId>-->
        <!--<artifactId>org.wso2.carbon.ml.siddhi.extension</artifactId>-->
        <!--<version>${carbon.ml.version}</version>-->
        <!--</dependency>-->

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.4.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <outputFile>../distribution/repository/conf/cep/storm/org.wso2.cep.storm.dependencies.jar
                            </outputFile>
                            <artifactSet>
                                <includes>
                                    <include>org.wso2.siddhi:siddhi-core</include>
                                    <include>org.wso2.siddhi:siddhi-query-api</include>
                                    <include>org.wso2.siddhi:siddhi-query-compiler</include>
                                    <include>org.antlr:antlr4-runtime</include>
                                    <include>com.google.guava:guava</include>
                                    <include>org.quartz-scheduler.wso2:quartz</include>

                                    <include>
                                        org.wso2.carbon.analytics-common:org.wso2.carbon.event.processor.manager.commons
                                    </include>
                                    <include>
                                        org.wso2.carbon.analytics-common:org.wso2.carbon.event.processor.manager.core
                                    </include>
                                    <include>org.wso2.carbon.event-processing:org.wso2.carbon.event.processor.common
                                    </include>
                                    <!--<include>org.wso2.carbon.ml:org.wso2.carbon.ml.siddhi.extension</include>-->

                                    <include>libthrift.wso2:libthrift</include>
                                    <include>org.wso2.orbit.com.lmax:disruptor</include>

                                    <include>org.wso2.siddhi:siddhi-extension-math</include>
                                    <include>org.wso2.siddhi:siddhi-extension-regex</include>
                                    <include>org.wso2.siddhi:siddhi-extension-string</include>
                                    <include>org.wso2.siddhi:siddhi-extension-event-table</include>
                                    <include>org.wso2.siddhi:siddhi-extension-eval-script</include>
                                    <include>org.wso2.siddhi:siddhi-extension-time</include>
                                    <include>org.apache.commons:commons-lang3</include>
                                    <include>org.apache.hadoop:hadoop-common</include>
                                    <include>org.apache.tomcat.wso2:jdbc-pool</include>
                                    <include>org.wso2.siddhi:siddhi-extension-timeseries</include>
                                    <include>org.apache.commons:commons-math3</include>
                                    <include>org.wso2.siddhi:siddhi-extension-geo</include>
                                    <include>org.apache.servicemix.bundles:org.apache.servicemix.bundles.geocoder-java
                                    </include>
                                    <include>com.googlecode.scalascriptengine:scalascriptengine_2.11</include>
                                    <include>org.scala-lang:scala-compiler</include>
                                    <include>org.scala-lang:scala-reflect</include>
                                </includes>
                            </artifactSet>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>wso2-nexus</id>
            <name>WSO2 internal Repository</name>
            <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
            </releases>
        </repository>

        <repository>
            <id>wso2.releases</id>
            <name>WSO2 internal Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
                <checksumPolicy>ignore</checksumPolicy>
            </releases>
        </repository>

        <repository>
            <id>wso2.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>

        <repository>
            <id>spring-milestones</id>
            <url>http://repo.springsource.org/libs-milestone/</url>
        </repository>

    </repositories>

    <properties>
        <!-- Carbon kernel version -->
        <carbon.kernel.version>4.4.2</carbon.kernel.version>

        <!-- Carbon component dependency versions -->
        <carbon.analytics.common.version>5.0.6</carbon.analytics.common.version>
        <!--<carbon.ml.version>1.0.1</carbon.ml.version>-->

        <!--CEP versions-->
        <siddhi.version>3.0.3</siddhi.version>
        <carbon.event.processing.version>2.0.9</carbon.event.processing.version>

        <!-- Third party dependencies -->
        <libthrift.wso2.version>0.8.0.wso2v1</libthrift.wso2.version>
        <orbit.version.commons.lang>2.6.0.wso2v1</orbit.version.commons.lang>
        <disruptor.version.range>[2.10.0,3.4)</disruptor.version.range>
        <disruptor.orbit.version>3.3.2.wso2v2</disruptor.orbit.version>
        <antlr.version>4.5</antlr.version>
        <guava.version>14.0.1</guava.version>
        <quartz.version>2.1.1.wso2v1</quartz.version>
        <commons-math3.version>3.2</commons-math3.version>
        <scala.version>2.11.0</scala.version>
        <scalascriptengine.version>1.3.10</scalascriptengine.version>
        <commons-lang3.version>3.3.2</commons-lang3.version>
        <hadoop.common.version>2.6.0</hadoop.common.version>
        <jdbc-pool.version>7.0.34.wso2v2</jdbc-pool.version>
        <geocoder.version>0.16_1</geocoder.version>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.scm.id>my-scm-server</project.scm.id>
    </properties>

    <distributionManagement>
        <repository>
            <id>nexus-releases</id>
            <name>WSO2 Nexus Release Repository</name>
            <url>http://maven.wso2.org/nexus/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>wso2.snapshots</id>
            <name>WSO2 Snapshot Repository</name>
            <url>http://maven.wso2.org/nexus/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>
</project>
