<?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>mindmaps</artifactId>
        <groupId>io.mindmaps</groupId>
        <version>0.3.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

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

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

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

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

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

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

        <profile>
            <id>titan</id>
            <properties>
                <mindmaps.test-profile>titan</mindmaps.test-profile>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>io.mindmaps</groupId>
                    <artifactId>mindmaps-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>2.1.9.2</version>
                </dependency>
            </dependencies>
        </profile>

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

    <dependencies>
        <dependency>
            <groupId>io.mindmaps</groupId>
            <artifactId>mindmaps-engine</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>io.mindmaps</groupId>
            <artifactId>mindmaps-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>3.2.1</version>
        </dependency>
    </dependencies>
</project>