<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>io.bigconnect</groupId>
        <artifactId>root</artifactId>
        <version>4.2.0</version>
    </parent>

    <artifactId>cypher-parent</artifactId>
    <version>4.2.0</version>
    <packaging>pom</packaging>
    <name>BigConnect: Cypher 3.5 support</name>

    <properties>
        <opencypher.version>1.0.0-M12</opencypher.version>
        <jetty.version>9.4.11.v20180605</jetty.version>
        <caffeine.version>2.6.2</caffeine.version>
    </properties>

    <profiles>
        <profile>
            <id>include-cypher</id>
            <activation>
                <property>
                    <name>!skipCypher</name>
                </property>
            </activation>
            <modules>
                <module>front-end</module>
                <module>ir</module>
                <module>planner-spi</module>
                <module>planner</module>
                <module>logical-plans</module>
                <module>runtime</module>
                <module>runtime-util</module>
                <module>common</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>
                <version>3.0.0-M2</version>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <!-- Jar file packaging settings -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <!-- Augment default jar with url -->
                        <execution>
                            <id>default-jar</id>
                            <configuration>
                                <archive>
                                    <manifest>
                                        <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                    </manifest>
                                    <manifestEntries>
                                        <Url>${project.organization.url}</Url>
                                    </manifestEntries>
                                </archive>
                            </configuration>
                        </execution>
                        <!-- Create test jar -->
                        <execution>
                            <id>create-test-jar</id>
                            <goals>
                                <goal>test-jar</goal>
                            </goals>
                        </execution>
                        <!-- Create javadoc jar, will be empty if javadoc generation is skipped -->
                        <execution>
                            <id>create-javadoc-jar</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <configuration>
                                <classifier>javadoc</classifier>
                                <classesDirectory>${project.build.directory}/apidocs/</classesDirectory>
                                <includes>
                                    <include>**/**</include>
                                </includes>
                                <excludes>
                                    <exclude>javadoc.sh</exclude>
                                    <exclude>javadoc.bat</exclude>
                                    <exclude>options</exclude>
                                    <exclude>packages</exclude>
                                    <exclude>argfile</exclude>
                                    <exclude>files</exclude>
                                </excludes>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <!-- inherited dependencies, versions are set in dependencyManagement -->

    <dependencies>
        <dependency>
            <groupId>io.bigconnect</groupId>
            <artifactId>core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>annotations</artifactId>
            <version>3.0.1</version>
        </dependency>

        <!-- shared java test dependencies -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-migrationsupport</artifactId>
            <version>5.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>5.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>2.21.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

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

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.scalautils</groupId>
                <artifactId>scalautils_2.11</artifactId>
                <version>2.1.7</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <artifactId>scala-library</artifactId>
                        <groupId>org.scala-lang</groupId>
                    </exclusion>
                    <exclusion>
                        <artifactId>scala-reflect</artifactId>
                        <groupId>org.scala-lang</groupId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.scalacheck</groupId>
                <artifactId>scalacheck_2.11</artifactId>
                <version>1.12.5</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.novus</groupId>
                <artifactId>salat-core_2.11</artifactId>
                <version>1.9.9</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.scala-lang</groupId>
                        <artifactId>scala-library</artifactId>
                    </exclusion>
                    <exclusion>
                        <artifactId>scalap</artifactId>
                        <groupId>org.scala-lang</groupId>
                    </exclusion>
                </exclusions>
            </dependency>

            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-migrationsupport</artifactId>
                <version>5.2.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
                <version>5.2.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-engine</artifactId>
                <version>5.2.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.junit.jupiter</groupId>
                <artifactId>junit-jupiter-params</artifactId>
                <version>5.2.0</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>1.3</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>1.3</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>2.21.0</version>
                <scope>test</scope>
            </dependency>

            <!-- other -->
            <dependency>
                <groupId>com.github.ben-manes.caffeine</groupId>
                <artifactId>caffeine</artifactId>
                <version>${caffeine.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-servlet</artifactId>
                <version>${jetty.version}</version>
            </dependency>
            <dependency>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-server</artifactId>
                <version>${jetty.version}</version>
            </dependency>

            <dependency>
                <groupId>net.sf.opencsv</groupId>
                <artifactId>opencsv</artifactId>
                <version>2.3</version>
            </dependency>

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