<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ GRAKN.AI - THE KNOWLEDGE GRAPH
  ~ Copyright (C) 2018 Grakn Labs Ltd
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU Affero General Public License as
  ~ published by the Free Software Foundation, either version 3 of the
  ~ License, or (at your option) any later version.
  ~
  ~ This program 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 Affero General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Affero General Public License
  ~ along with this program.  If not, see <https://www.gnu.org/licenses/>.
  -->

<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-test-profiles</artifactId>
        <relativePath>../grakn-test-profiles</relativePath>
        <groupId>ai.grakn</groupId>
        <version>1.4.2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>grakn-engine</artifactId>

    <dependencies>
        <dependency>
            <groupId>com.google.auto.value</groupId>
            <artifactId>auto-value</artifactId>
        </dependency>
        <dependency>
            <groupId>ro.fortsoft.pf4j</groupId>
            <artifactId>pf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>grakn-graql</artifactId>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-all</artifactId>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>grakn-kb</artifactId>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>client-java</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>grakn-graql-shell</artifactId>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-sql</artifactId>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-xml</artifactId>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-csv</artifactId>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-json</artifactId>
        </dependency>
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>migration-export</artifactId>
        </dependency>
        <!-- Exposes metrics as a servlet -->
        <dependency>
          <groupId>io.dropwizard.metrics</groupId>
          <artifactId>metrics-servlets</artifactId>
        </dependency>
        <!-- Used to format metrics for Prometheus -->
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient_servlet</artifactId>
        </dependency>
        <dependency>
            <groupId>io.prometheus</groupId>
            <artifactId>simpleclient_dropwizard</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sparkjava</groupId>
            <artifactId>spark-core</artifactId>
        </dependency>

        <!-- Used for Response Serialisation -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>

        <dependency>
            <groupId>com.jayway.restassured</groupId>
            <artifactId>rest-assured</artifactId>
        </dependency>

       <dependency>
            <groupId>com.github.stefanbirkner</groupId>
            <artifactId>system-rules</artifactId>
        </dependency>

        <dependency>
            <groupId>io.dropwizard.metrics</groupId>
            <artifactId>metrics-core</artifactId>
        </dependency>
        <dependency>
            <groupId>jline</groupId>
            <artifactId>jline</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.rholder</groupId>
            <artifactId>guava-retrying</artifactId>
        </dependency>
        <dependency>
            <groupId>org.rocksdb</groupId>
            <artifactId>rocksdbjni</artifactId>
        </dependency>

        <!-- GRPC -->
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-protobuf</artifactId>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-stub</artifactId>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-netty</artifactId>
        </dependency>
        <dependency>
            <groupId>org.zeroturnaround</groupId>
            <artifactId>zt-exec</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
        </dependency>
        <!-- Required For REST Components and Headers-->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
        </dependency>
    </dependencies>

    <build>
        <!-- This is required so we fetch the OS-specific GRPC implementation -->
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.4.1.Final</version>
            </extension>
        </extensions>

        <plugins>
            <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.5.0</version>
                <configuration>
                    <!-- Get the (OS-specific) executable to generate Java code from proto files -->
                    <protocArtifact>com.google.protobuf:protoc:3.0.2:exe:${os.detected.classifier}</protocArtifact>
                    <pluginId>grpc-java</pluginId>
                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:1.2.0:exe:${os.detected.classifier}</pluginArtifact>
                    <protoSourceRoot>../client-protocol/proto</protoSourceRoot>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>compile-custom</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
