<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (c) 2017, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
  ~
  ~ WSO2 Inc. 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/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>org.wso2.carbon.analytics</groupId>
        <artifactId>org.wso2.carbon.analytics.parent</artifactId>
        <version>2.0.264</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.wso2.carbon.sp.jobmanager.core</artifactId>
    <packaging>bundle</packaging>

    <name>WSO2 Stream Processor - Job Manager</name>
    <url>http://wso2.org</url>

    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.msf4j</groupId>
            <artifactId>msf4j-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>javax.ws.rs-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-joda</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.logging</groupId>
            <artifactId>pax-logging-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.com.squareup.okhttp</groupId>
            <artifactId>okhttp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.com.squareup.okio</groupId>
            <artifactId>okio</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.utils</groupId>
            <artifactId>org.wso2.carbon.utils</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.datasources</groupId>
            <artifactId>org.wso2.carbon.datasource.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.coordination</groupId>
            <artifactId>org.wso2.carbon.cluster.coordinator.service</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon.coordination</groupId>
            <artifactId>org.wso2.carbon.cluster.coordinator.commons</artifactId>
        </dependency>
        <!-- Apache commons dependencies -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
        </dependency>

        <!--Siddhi dependencies-->
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-query-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-query-compiler</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.siddhi</groupId>
            <artifactId>siddhi-annotations</artifactId>
        </dependency>

        <!--SiddhiRuntime dependancies-->
        <dependency>
            <groupId>org.wso2.extension.siddhi.io.kafka</groupId>
            <artifactId>siddhi-io-kafka</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.extension.siddhi.io.email</groupId>
            <artifactId>siddhi-io-email</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.extension.siddhi.io.tcp</groupId>
            <artifactId>siddhi-io-tcp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.extension.siddhi.io.http</groupId>
            <artifactId>siddhi-io-http</artifactId>
        </dependency>
        <!--Map Extensions-->
        <!--Mapper Extensions-->
        <dependency>
            <groupId>org.wso2.extension.siddhi.map.xml</groupId>
            <artifactId>siddhi-map-xml</artifactId>
            <version>${siddhi.map.xml.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.extension.siddhi.map.json</groupId>
            <artifactId>siddhi-map-json</artifactId>
            <version>${siddhi.map.json.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.extension.siddhi.map.binary</groupId>
            <artifactId>siddhi-map-binary</artifactId>
            <version>${siddhi.map.binary.version}</version>
        </dependency>
        <!--siddhi-stores-->
        <dependency>
            <groupId>org.wso2.extension.siddhi.store.solr</groupId>
            <artifactId>siddhi-store-solr</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.extension.siddhi.store.rdbms</groupId>
            <artifactId>siddhi-store-rdbms</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wso2.carbon.analytics</groupId>
            <artifactId>org.wso2.carbon.stream.processor.core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.101tec</groupId>
            <artifactId>zkclient</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Testing purposes -->
        <dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.zookeeper</groupId>
            <artifactId>zookeeper</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_2.11</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <!--plugin>
                <groupId>org.wso2.maven.plugins</groupId>
                <artifactId>swagger2msf4j-maven-plugin</artifactId>
                <version>1.0-SNAPSHOT</version>
                <configuration>
                    <inputSpec>${project.basedir}/src/main/resources/job-manager-api.yaml</inputSpec>
                </configuration>
            </plugin-->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.9.1</version>
                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>src/gen/java</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <basedir>${project.build.outputDirectory}/org/wso2/carbon/sp/jobmanager/core</basedir>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin><!-- Overridden from parent pom to exclude generated sources -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <configuration>
                            <configLocation>
                                https://raw.githubusercontent.com/wso2/code-quality-tools/master/checkstyle/checkstyle.xml
                            </configLocation>
                            <suppressionsLocation>
                                https://raw.githubusercontent.com/wso2/code-quality-tools/master/checkstyle/suppressions.xml
                            </suppressionsLocation>
                            <encoding>UTF-8</encoding>
                            <consoleOutput>true</consoleOutput>
                            <failsOnError>true</failsOnError>
                            <includeTestSourceDirectory>true</includeTestSourceDirectory>
                            <!--Exclude generated sources-->
                            <excludes>**/gen/**/*</excludes>
                            <!--skip for generated resources-->
                            <skip>true</skip>
                        </configuration>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <properties>
        <private.package>
            org.I0Itec.zkclient.*,
            scala.*
        </private.package>
        <import.package>
            !org.I0Itec.zkclient,
            !org.I0Itec.zkclient.*,
            !scala.*,
            !scala,
            org.wso2.carbon.kernel;version="${carbon.kernel.package.import.version.range}",
            org.wso2.msf4j.*;version="${msf4j.import.version.range}",
            javax.ws.rs.*;version="0.0.0",
            *;resolution:=optional
        </import.package>
        <export.package>
            org.I0Itec.zkclient,
            org.I0Itec.zkclient.*,
            scala.*,
            org.wso2.carbon.sp.jobmanager.core.*
        </export.package>
        <DynamicImport-Package>*</DynamicImport-Package>
        <carbon.component>
            osgi.service; objectClass="org.wso2.msf4j.Microservice"; serviceCount="1"
        </carbon.component>
    </properties>
</project>
