<!--
  ~ Copyright (c) 2013-2020 GraphAware
  ~
  ~ This file is part of the GraphAware Framework.
  ~
  ~ GraphAware Framework is free software: you can redistribute it and/or modify it under
  ~ the terms of the GNU 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 General Public License for more details. You should have received a copy of
  ~ the GNU General Public License along with this program.  If not, see
  ~ <http://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">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.graphaware.neo4j</groupId>
    <artifactId>graphaware-parent</artifactId>
    <version>4.1.4.58</version>
    <packaging>pom</packaging>

    <name>GraphAware Neo4j Framework Parent POM</name>
    <description>Parent POM for GraphAware Neo4j Framework and Modules</description>
    <url>http://graphaware.com/products</url>

    <modules>
        <module>common</module>
        <module>runtime</module>
        <module>tests</module>
        <module>tx-api</module>
        <module>tx-executor</module>
        <module>writer</module>
        <module>build</module>

        <module>module-parent</module>
        <module>graphaware-apoc-dependency-test</module>

        <!--examples-->
        <module>examples/friendship-strength-counter</module>
        <module>examples/change-logger</module>
        <module>examples/friendship-strength-counter-module</module>
    </modules>

    <licenses>
        <license>
            <name>GNU General Public License, version 3</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <organization>
        <name>Graph Aware Limited</name>
        <url>http://graphaware.com</url>
    </organization>

    <scm>
        <connection>scm:git:git@github.com:graphaware/neo4j-framework.git</connection>
        <developerConnection>scm:git:git@gitlab.com:graphaware/neo4j-plugins/neo4j-framework.git</developerConnection>
        <url>git@github.com:graphaware/neo4j-framework.git</url>
      <tag>Version-4.1.4.58</tag>
  </scm>

    <properties>
        <java.version>11</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <neo4j.version>4.1.4</neo4j.version>
        <spring.version>5.2.8.RELEASE</spring.version>
        <uuid.version>3.5</uuid.version>
        <jackson.version>2.9.10</jackson.version>
        <maven.plugin.surefire>2.22.2</maven.plugin.surefire>
        <junit.version>5.6.2</junit.version>
        <mockito.version>1.10.19</mockito.version>
        <jsonassert.version>1.5.0</jsonassert.version>
        <guava.version>21.0</guava.version>
        <fw.version>4.1.4.58</fw.version>
        <commons-config.version>2.5</commons-config.version>
    </properties>

    <developers>
        <developer>
            <id>ga</id>
            <name>GraphAware</name>
        </developer>
    </developers>

    <repositories>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>eaio.com</id>
            <url>https://repo.eaio.com/maven2</url>
        </repository>
    </repositories>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>doclint-java8-disable</id>
            <activation>
                <jdk>[1.8,)</jdk>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.2.0</version>
                        <configuration>
                            <additionalOptions>-Xdoclint:none</additionalOptions>
                            <additionalJOption>-Xdoclint:none</additionalJOption>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <dependencyManagement>
        <dependencies>

            <!-- GraphAware -->

            <dependency>
                <groupId>com.graphaware.neo4j</groupId>
                <artifactId>common</artifactId>
                <version>${fw.version}</version>
            </dependency>

            <dependency>
                <groupId>com.graphaware.neo4j</groupId>
                <artifactId>common</artifactId>
                <version>${fw.version}</version>
                <scope>test</scope>
                <classifier>test-jar</classifier>
            </dependency>

            <dependency>
                <groupId>com.graphaware.neo4j</groupId>
                <artifactId>runtime</artifactId>
                <version>${fw.version}</version>
            </dependency>

            <dependency>
                <groupId>com.graphaware.neo4j</groupId>
                <artifactId>writer</artifactId>
                <version>${fw.version}</version>
            </dependency>

            <dependency>
                <groupId>com.graphaware.neo4j</groupId>
                <artifactId>tests</artifactId>
                <version>${fw.version}</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>com.graphaware.neo4j</groupId>
                <artifactId>tx-api</artifactId>
                <version>${fw.version}</version>
            </dependency>

            <dependency>
                <groupId>com.graphaware.neo4j</groupId>
                <artifactId>tx-executor</artifactId>
                <version>${fw.version}</version>
            </dependency>

            <!--            <dependency>-->
            <!--                <groupId>com.graphaware.neo4j</groupId>-->
            <!--                <artifactId>uuid</artifactId>-->
            <!--                <version>3.5.19.55.19</version>-->
            <!--                <scope>test</scope>-->
            <!--            </dependency>-->

            <!-- Neo4j -->

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

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

            <!-- Testing -->

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

            <dependency>
                <groupId>org.skyscreamer</groupId>
                <artifactId>jsonassert</artifactId>
                <version>${jsonassert.version}</version>
                <scope>test</scope>
            </dependency>

            <!-- Serialization -->

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

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

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

            <!-- Spring -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-expression</artifactId>
                <version>${spring.version}</version>
            </dependency>

            <!-- Guava -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-configuration2</artifactId>
                <version>${commons-config.version}</version>
            </dependency>

            <!-- UUID -->
            <dependency>
                <groupId>com.eaio.uuid</groupId>
                <artifactId>uuid</artifactId>
                <version>${uuid.version}</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <dependencies>

        <dependency>
            <groupId>org.neo4j</groupId>
            <artifactId>neo4j</artifactId>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.neo4j.test</groupId>
            <artifactId>neo4j-harness</artifactId>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M5</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <configuration>
                    <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.7</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
            </plugin>
            <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-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <links>
                        <link>https://neo4j.com/docs/java-reference/4.0/javadocs/</link>
                    </links>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
