<?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.1</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>grakn-dist</artifactId>

    <properties>
        <main.basedir>${project.parent.parent.basedir}</main.basedir>
    </properties>

    <dependencies>
        <!--Logging dependencies: Compile scope needed to override parent test scope-->
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-core</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
        <!--Jaino used for conditionals in log files-->
        <dependency>
            <groupId>org.codehaus.janino</groupId>
            <artifactId>janino</artifactId>
        </dependency>

        <!--Core dependencies-->
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>grakn-engine</artifactId>
        </dependency>

        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>grakn-graql-shell</artifactId>
        </dependency>

        <!--Migrations-->
        <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>

        <!-- Factories -->
        <dependency>
            <groupId>ai.grakn</groupId>
            <artifactId>grakn-factory</artifactId>
        </dependency>

        <!-- Cassandra uses airline for command line parsing -->
        <dependency>
            <groupId>io.airlift</groupId>
            <artifactId>airline</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-bin</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <finalName>grakn-core-${project.version}</finalName>
                    <tarLongFileMode>gnu</tarLongFileMode>
                    <descriptors>
                        <descriptor>${project.basedir}/src/dist.xml</descriptor>
                    </descriptors>
                    <appendAssemblyId>false</appendAssemblyId>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <configuration>
                    <skipNexusStagingDeployMojo>${skip.deploy.dist}</skipNexusStagingDeployMojo>
              </configuration>
            </plugin>
            <plugin>
                <groupId>com.googlecode.maven-download-plugin</groupId>
                <artifactId>download-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>install-shunit2</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>wget</goal>
                        </goals>
                        <configuration>
                            <url>https://github.com/burukuru/shunit2/archive/master.zip</url>
                            <unpack>true</unpack>
                            <outputDirectory>${project.basedir}/target/lib</outputDirectory>
                            <skip>${skipTests}</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
