<?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>dashbuilder-backend</artifactId>
    <groupId>org.dashbuilder</groupId>
    <version>0.3.0.Beta2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>dashbuilder-dataset-elasticsearch</artifactId>
  <name>Dashbuilder Dataset ElasticSearch Provider</name>

  <build>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
      </resource>
      <!-- Sandbox directory contains files that must be compiled with Java 1.7+. -->
      <resource>
        <directory>src/main/sandbox</directory>
        <excludes>
          <exclude>**/*.*</exclude>
        </excludes>
      </resource>
    </resources>
  </build>

  <profiles>
    <!-- 
      IMPORTANT NOTE:
      **************
      - ElasticSearch v1.X requires Java 1.7+
      - Running tests implies to run an ElasticSearch server instance
      - Until not moving to Java 1.7+ this module's tests must be skipped by default, as they will fail using Java 1.6
      - You can disable or remove this profile if using Java 1.7+
    -->
    <profile>
      <id>java6</id>
      <properties>
        <maven.test.skip>true</maven.test.skip>
      </properties>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
    </profile>
  </profiles>

  
  <dependencies>

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

    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.dashbuilder</groupId>
      <artifactId>dashbuilder-dataset-api</artifactId>
    </dependency>

    <dependency>
      <groupId>org.dashbuilder</groupId>
      <artifactId>dashbuilder-dataset-core</artifactId>
    </dependency>

    <dependency>
      <groupId>org.dashbuilder</groupId>
      <artifactId>dashbuilder-common</artifactId>
    </dependency>

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

    <dependency>
      <groupId>com.google.code.gson</groupId>
      <artifactId>gson</artifactId>
    </dependency>

    <!-- Jest ES client. -->
    <dependency>
      <groupId>io.searchbox</groupId>
      <artifactId>jest</artifactId>
    </dependency>

    <dependency>
      <groupId>io.searchbox</groupId>
      <artifactId>jest-common</artifactId>
    </dependency>

    <dependency>
      <groupId>joda-time</groupId>
      <artifactId>joda-time</artifactId>
    </dependency>

    <!-- Testing scope -->
    <dependency>
      <groupId>org.elasticsearch</groupId>
      <artifactId>elasticsearch</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-core</artifactId>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.apache.lucene</groupId>
      <artifactId>lucene-queryparser</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
      <type>jar</type>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.dashbuilder</groupId>
      <artifactId>dashbuilder-common</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.dashbuilder</groupId>
      <artifactId>dashbuilder-dataset-core</artifactId>
      <type>test-jar</type>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpclient</artifactId>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <scope>test</scope>
    </dependency>
    
  </dependencies>
  
</project>
