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

<!--
  ~ Copyright (c) 2002-2018 "Neo Technology,"
  ~ Network Engine for Objects in Lund AB [http://neotechnology.com]
  ~
  ~ This product is licensed to you under the Apache License, Version 2.0 (the "License").
  ~ You may not use this product except in compliance with the License.
  ~
  ~ This product may include a number of subcomponents with
  ~ separate copyright notices and license terms. Your use of the source
  ~ code for these subcomponents is subject to the terms and
  ~  conditions of the subcomponent's license, as noted in the LICENSE file.
  -->

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

    <groupId>org.neo4j</groupId>
    <artifactId>neo4j-ogm</artifactId>
    <packaging>pom</packaging>
    <version>3.1.2</version>

    <modules>
        <module>api</module>
        <module>http-driver</module>
        <module>embedded-driver</module>
        <module>bolt-driver</module>
        <module>core</module>
        <module>test</module>
    </modules>

    <properties>
        <!-- to be overridden in sub modules -->
        <java-module-name></java-module-name>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <commonslang>3.4</commonslang>
        <commonsio>2.4</commonsio>
        <jackson>2.7.1</jackson>
        <httpclient>4.5.2</httpclient>
        <junit>4.12</junit>
        <assertj>3.8.0</assertj>
        <slf4j>1.7.21</slf4j>
        <logback>1.1.7</logback>
        <mockito>2.2.29</mockito>
        <!-- default for build, if no profiles invoked -->
        <neo4j>3.3.5</neo4j>
        <bolt>1.5.0</bolt>
        <fast.classpath.scanner>2.18.1</fast.classpath.scanner>
        <ogm.properties>ogm-bolt.properties</ogm.properties>
        <neo4j.edition>enterprise</neo4j.edition>
    </properties>

    <dependencyManagement>
        <dependencies>

            <!--Compile and Runtime Dependencies -->
            <dependency>
                <groupId>org.neo4j.driver</groupId>
                <artifactId>neo4j-java-driver</artifactId>
                <version>${bolt}</version>
            </dependency>

            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${httpclient}</version>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commonslang}</version>
            </dependency>

            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commonsio}</version>
            </dependency>

            <!--Testing  Dependencies -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.assertj</groupId>
                <artifactId>assertj-core</artifactId>
                <version>${assertj}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.neo4j.test</groupId>
                <artifactId>neo4j-harness</artifactId>
                <version>${neo4j}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.neo4j.test</groupId>
                <artifactId>neo4j-harness-enterprise</artifactId>
                <version>${neo4j}</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-nop</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-core</artifactId>
                <version>${logback}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito}</version>
                <scope>test</scope>
            </dependency>

            <!-- Embedded Driver Dependencies -->
            <dependency>
                <groupId>org.neo4j</groupId>
                <artifactId>neo4j</artifactId>
                <version>${neo4j}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.neo4j</groupId>
                <artifactId>neo4j-cluster</artifactId>
                <version>${neo4j}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.neo4j</groupId>
                <artifactId>neo4j-ha</artifactId>
                <version>${neo4j}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>org.neo4j</groupId>
                <artifactId>neo4j-enterprise</artifactId>
                <version>${neo4j}</version>
                <scope>provided</scope>
            </dependency>

            <dependency>
                <groupId>io.github.lukehutch</groupId>
                <artifactId>fast-classpath-scanner</artifactId>
                <version>${fast.classpath.scanner}</version>
                <scope>compile</scope>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <!-- for bolt -->
    <repositories>
        <repository>
            <id>neo4j-snapshot-repository</id>
            <name>Neo4j Maven 2 snapshot repository</name>
            <url>http://m2.neo4j.org/content/repositories/snapshots</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.4</version>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <!--
                Check for some javadoc issues, but not for all missing @param and @return etc..
                See http://docs.oracle.com/javase/8/docs/technotes/tools/windows/javadoc.html#BEJEFABE
                -->
                <configuration>
                    <additionalparam>-Xdoclint:html</additionalparam>
                    <additionalparam>-Xdoclint:syntax</additionalparam>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.6</version>
                <configuration>
                    <archive>
                        <addMavenDescriptor>false</addMavenDescriptor>
						<manifestEntries>
							<Implementation-Title>${project.name}</Implementation-Title>
							<Implementation-Version>${project.version}</Implementation-Version>
							<Automatic-Module-Name>${java-module-name}</Automatic-Module-Name>
						</manifestEntries>
                    </archive>
                    <skipIfEmpty>true</skipIfEmpty>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

        </plugins>

        <resources>

            <resource>
                <directory>${project.basedir}</directory>
                <includes>
                    <include>CHANGES.txt</include>
                    <include>README.md</include>
                </includes>
                <targetPath>META-INF</targetPath>
            </resource>

            <resource>
                <directory>src/main/resources/META-INF/services</directory>
                <targetPath>META-INF/services</targetPath>
            </resource>

        </resources>

        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>

    </build>

    <profiles>

        <profile>
            <id>neo4j-3.1</id>
            <properties>
                <neo4j>3.1.9</neo4j>
            </properties>
        </profile>

        <profile>
            <id>neo4j-3.2</id>
            <properties>
                <neo4j>3.2.12</neo4j>
            </properties>
        </profile>

        <profile>
            <id>neo4j-3.3</id>
            <properties>
                <neo4j>3.3.5</neo4j>
            </properties>
        </profile>

        <profile>
            <id>neo4j-3.4</id>
            <properties>
                <neo4j>3.4.6</neo4j>
            </properties>
        </profile>

        <profile>
            <id>neo4j-3.5</id>
            <properties>
                <neo4j>3.5.0-alpha07</neo4j>
            </properties>
        </profile>

        <profile>
            <id>driver-1.4</id>
            <properties>
                <bolt>1.4.5</bolt>
            </properties>
        </profile>

        <profile>
            <id>driver-1.5</id>
            <properties>
                <bolt>1.5.0</bolt>
            </properties>
        </profile>

        <profile>
            <id>driver-1.6</id>
            <properties>
                <bolt>1.6.0</bolt>
            </properties>
        </profile>

        <profile>
            <id>embedded</id>
            <properties>
                <ogm.properties>ogm-embedded.properties</ogm.properties>
            </properties>
        </profile>

        <profile>
            <id>http</id>
            <properties>
                <ogm.properties>ogm-http.properties</ogm.properties>
            </properties>
        </profile>

        <profile>
            <id>bolt</id>
            <properties>
                <ogm.properties>ogm-bolt.properties</ogm.properties>
            </properties>
        </profile>

        <profile>
            <id>default</id>
            <properties>
                <ogm.properties>ogm-http.properties</ogm.properties>
            </properties>
        </profile>

    </profiles>

    <!-- Stuff Maven Central needs -->
    <name>Neo4j Object-Graph Mapper</name>
    <description>Annotation based Object Graph Mapper for Neo4j Server with Repository and Conversion support
    </description>
    <organization>
        <name>Neo Technology, Inc.</name>
        <url>http://neotechnology.com/</url>
    </organization>
    <developers>
        <developer>
            <id>neo-technology</id>
        </developer>
    </developers>
    <url>http://github.com/neo4j/neo4j-ogm/</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <url>http://github.com/neo4j/neo4j-ogm/</url>
    </scm>

</project>
