<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>org.graphfoundation.ongdb</groupId>
        <artifactId>parent</artifactId>
        <version>1.0.0</version>
        <relativePath>../..</relativePath>
    </parent>

    <artifactId>cypher-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
    <name>ONgDB - Community Geequel Build</name>
    <description>Project that builds the ONgDB Geequel modules as part of the Community distribution.</description>
    <url>https://graphfoundation.org/projects/ongdb/${project.version}/${project.artifactId}</url>

    <properties>
        <licensing.prepend.text>licensing/notice-gpl-prefix.txt</licensing.prepend.text>
        <license-text.header>headers/GPL-3-header.txt</license-text.header>
    </properties>

    <scm>
        <connection>scm:git:git://github.com/graphfoundation/ongdb.git</connection>
        <developerConnection>scm:git:git@github.com:graphfoundation/ongdb.git</developerConnection>
        <url>https://github.com/graphfoundation/ongdb</url>
    </scm>

    <profiles>
        <profile>
            <id>include-cypher</id>
            <activation>
                <property>
                    <name>!skipCypher</name>
                </property>
            </activation>
            <modules>
                <module>frontend-3.4</module>
                <module>util-3.4</module>
                <module>ir-3.4</module>
                <module>cypher-planner-3.4</module>
                <module>planner-spi-3.4</module>
                <module>expressions-3.4</module>
                <module>cypher</module>
                <module>cypher-logical-plans-3.4</module>
                <module>runtime-util</module>
                <module>interpreted-runtime</module>
            </modules>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <configuration>
                    <rules combine.children="append">
                        <requireFilesDontExist>
                            <files>
                                <file>cypher-compiler-3.2</file>
                                <file>cypher-compiler-3.1</file>
                                <file>cypher-compiler-3.0</file>
                                <file>cypher-compiler-2.3</file>
                            </files>
                        </requireFilesDontExist>
                    </rules>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.scalastyle</groupId>
                    <artifactId>scalastyle-maven-plugin</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <verbose>false</verbose>
                        <failOnViolation>true</failOnViolation>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <failOnWarning>false</failOnWarning>
                        <inputEncoding>UTF-8</inputEncoding>
                        <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
                        <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
                        <configLocation>${project.basedir}/../scalastyle_config.xml</configLocation>
                        <outputFile>${basedir}/target/scalastyle-output.xml</outputFile>
                        <outputEncoding>UTF-8</outputEncoding>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <!-- inherited dependencies, versions are set in dependencyManagement -->

    <dependencies>

        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>annotations</artifactId>
        </dependency>

        <!-- shared java test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>

    </dependencies>

    <!-- Required versions for each dependency, inherited dependencies are set in dependencies -->

    <dependencyManagement>
        <dependencies>
            <!-- neo4j -->
            <dependency>
                <groupId>org.graphfoundation.ongdb</groupId>
                <artifactId>ongdb-kernel</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.graphfoundation.ongdb</groupId>
                <artifactId>ongdb-kernel</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.graphfoundation.ongdb</groupId>
                <artifactId>ongdb-common</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.graphfoundation.ongdb</groupId>
                <artifactId>ongdb-io</artifactId>
                <version>${project.version}</version>
                <type>test-jar</type>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.graphfoundation.ongdb</groupId>
                <artifactId>ongdb-lucene-index</artifactId>
                <version>${project.version}</version>
            </dependency>
            <!-- graph matching is used in old cypher compilers 3.1 and 2.3 we can use the old component -->
            <dependency>
                <groupId>org.neo4j</groupId>
                <artifactId>neo4j-graph-matching</artifactId>
                <version>${cypher.compatibility.31}</version>
            </dependency>
            <dependency>
                <groupId>org.graphfoundation.ongdb</groupId>
                <artifactId>ongdb-graph-algo</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!-- other -->
            <dependency>
                <groupId>org.parboiled</groupId>
                <artifactId>parboiled-scala_2.11</artifactId>
                <version>1.1.7</version>
                <exclusions>
                    <exclusion>
                        <artifactId>scala-library</artifactId>
                        <groupId>org.scala-lang</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>
</project>
