<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright 2010-2013 Orient Technologies LTD (www.orientechnologies.com)
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.orientechnologies</groupId>
        <artifactId>orientdb-parent</artifactId>
        <version>2.2.13</version>
        <relativePath/>
    </parent>

    <artifactId>orientdb-spatial</artifactId>

    <packaging>jar</packaging>

    <properties>
        <orientdb.version>${project.parent.version}</orientdb.version>
        <lucene.version>5.3.2</lucene.version>
        <geotools.version>13.2</geotools.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <argLine>-ea -Xmx2048m -XX:MaxDirectMemorySize=512g -Dstorage.diskCache.bufferSize=4096 -Dindex.flushAfterCreate=false
            -Dstorage.makeFullCheckpointAfterCreate=false
            -Dstorage.makeFullCheckpointAfterClusterCreate=false -Dstorage.wal.syncOnPageFlush=false
            -Dstorage.configuration.syncOnUpdate=false
            -Dmemory.directMemory.trackMode=true
            -Djava.util.logging.manager=com.orientechnologies.common.log.OLogManager$DebugLogManager
        </argLine>

    </properties>

    <name>OrientDB Lucene spatial index</name>
    <description>Lucene plugin for OrientDB NoSQL document graph dbms</description>
    <url>http://maven.apache.org</url>
    <inceptionYear>2013</inceptionYear>

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

                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.surefire</groupId>
                        <artifactId>surefire-junit4</artifactId>
                        <version>${surefire.version}</version>
                    </dependency>
                </dependencies>

                <configuration>
                    <useFile>false</useFile>

                    <groups>embedded</groups>
                    <systemPropertyVariables>
                        <buildDirectory>${project.build.directory}</buildDirectory>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <configuration>
                    <destFile>${project.basedir}/target/jacoco.exec</destFile>
                    <dataFile>${project.basedir}/target/jacoco.exec</dataFile>
                </configuration>
            </plugin>
            <plugin>

                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/assembly.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <!-- this is used for inheritance merges -->
                        <phase>package</phase>
                        <!-- bind to the packaging phase -->
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration></configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <mavenExecutorId>forked-path</mavenExecutorId>
                    <useReleaseProfile>false</useReleaseProfile>
                    <localCheckout>true</localCheckout>
                    <pushChanges>false</pushChanges>
                    <allowTimestampedSnapshots>true</allowTimestampedSnapshots>
                    <arguments>-Prelease</arguments>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>docker-maven-plugin</artifactId>
                <version>0.4.3</version>
                <configuration>
                    <imageName>orientdb/orientdb-spatial</imageName>
                    <imageTags>
                        <imageTag>${project.version}</imageTag>
                    </imageTags>
                    <dockerDirectory>docker</dockerDirectory>
                    <!-- copy the service's jar file from target into the root directory of the image -->
                    <resources>
                        <resource>
                            <targetPath>/</targetPath>
                            <directory>${project.build.directory}/</directory>
                            <include>${project.build.finalName}-dist.jar</include>
                        </resource>
                    </resources>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <dependencies>

        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-test-commons</artifactId>
            <version>${orientdb.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.testng</groupId>
                    <artifactId>testng</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-lucene</artifactId>
            <version>${orientdb.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-core</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.lucene</groupId>
            <artifactId>lucene-spatial</artifactId>
            <version>${lucene.version}</version>
        </dependency>
        <dependency>
            <groupId>com.vividsolutions</groupId>
            <artifactId>jts</artifactId>
            <version>1.13</version>
        </dependency>


        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-lucene</artifactId>
            <version>${orientdb.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-core</artifactId>
            <version>${orientdb.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-client</artifactId>
            <version>${orientdb.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-server</artifactId>
            <version>${orientdb.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.orientechnologies</groupId>
            <artifactId>orientdb-graphdb</artifactId>
            <version>${orientdb.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.4</version>
            <scope>test</scope>
        </dependency>

    </dependencies>
</project>
