<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Grakn - A Distributed Semantic Database
  ~ Copyright (C) 2016  Grakn Labs Limited
  ~
  ~ Grakn is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License as published by
  ~ the Free Software Foundation, either version 3 of the License, or
  ~ (at your option) any later version.
  ~
  ~ Grakn is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with Grakn. If not, see <http://www.gnu.org/licenses/gpl.txt>.
  -->

<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>grakn</artifactId>
        <groupId>ai.grakn</groupId>
        <version>0.7.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>grakn-test</artifactId>
    <packaging>jar</packaging>

    <properties>
        <grakn.test-profile>tinker</grakn.test-profile>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>

                <configuration>
                    <systemPropertyVariables>
                        <grakn.conf>../conf/test/${grakn.test-profile}/grakn-engine.properties</grakn.conf>
                        <grakn.test-profile>${grakn.test-profile}</grakn.test-profile>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.19.1</version>

                <configuration>
                    <systemPropertyVariables>
                        <grakn.conf>../conf/test/${grakn.test-profile}/grakn-engine.properties</grakn.conf>
                        <grakn.test-profile>${grakn.test-profile}</grakn.test-profile>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>tinker</id>
            <properties>
                <grakn.test-profile>tinker</grakn.test-profile>
            </properties>
        </profile>

        <profile>
            <id>titan</id>
            <properties>
                <grakn.test-profile>titan</grakn.test-profile>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>ai.grakn</groupId>
                    <artifactId>grakn-titan-factory</artifactId>
                    <version>${project.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-log4j12</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>ch.qos.logback</groupId>
                            <artifactId>logback-classic</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
                <dependency>
                    <groupId>org.cassandraunit</groupId>
                    <artifactId>cassandra-unit</artifactId>
                    <version>${cassandra-unit.version}</version>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>orientdb</id>
            <properties>
                <grakn.test-profile>orientdb</grakn.test-profile>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>ai.grakn</groupId>
                    <artifactId>grakn-orientdb-factory</artifactId>
                    <version>${project.version}</version>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>scaling</id>
            <properties>
                <grakn.test-profile>titan</grakn.test-profile>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>ai.grakn</groupId>
                    <artifactId>grakn-titan-factory</artifactId>
                    <version>${project.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-log4j12</artifactId>
                        </exclusion>
                        <exclusion>
                            <groupId>ch.qos.logback</groupId>
                            <artifactId>logback-classic</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <argLine>-Xmx16g</argLine>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>grakn-engine</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>grakn-graql-shell</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jayway.restassured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>${rest-assured.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>${commons-collections.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <version>${commons-csv.version}</version>
        </dependency>

        <!-- migration -->
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-sql</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>${h2-database.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-csv</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-owl</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-databind</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-json</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-export</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-base</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.owlapi</groupId>
            <artifactId>org.semanticweb.hermit</artifactId>
            <version>${hermit.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
            <version>${systen-rules.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>