<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>net.sansa-stack</groupId>
        <artifactId>sansa-bom_2.12</artifactId>
        <version>0.8.7</version>
        <relativePath>sansa-bom</relativePath>
    </parent>
    <artifactId>sansa-parent_2.12</artifactId>
    <packaging>pom</packaging>
    <name>SANSA - Parent</name>

    <description>SANSA Parent project for managing common dependencies, plugins, meta-data, properties, etc.
    </description>

    <organization>
        <name>Smart Data Analytics (SDA) Research Group</name>
        <url>http://sda.tech/</url>
    </organization>

    <inceptionYear>2016</inceptionYear>

    <url>http://sansa-stack.net/</url>

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>https://www.apache.org/licenses/</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/SANSA-Stack/SANSA-RDF</url>
        <connection>scm:git:git://github.com/SANSA-Stack/SANSA-Stack.git</connection>
        <developerConnection>scm:git:git@github.com:SANSA-Stack/SANSA-Stack.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <issueManagement>
        <url>https://github.com/SANSA-Stack/SANSA-Stack/issues</url>
        <system>GitHub</system>
    </issueManagement>

    <prerequisites>
        <maven>3.1</maven>
    </prerequisites>

    <properties>
        <maven.version>3.1</maven.version>
        <maven.compiler.release>11</maven.compiler.release>

        <!--
            <maven.compiler.source>1.8</maven.compiler.source>
            <maven.compiler.target>1.8</maven.compiler.target>
        -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <CodeCacheSize>1g</CodeCacheSize>
    </properties>

    <modules>
        <module>sansa-hadoop-jena</module>
        <module>sansa-spark-jena-java</module>

        <module>sansa-test-resources</module>
        <module>sansa-resource-metadata</module>
        <module>sansa-resource-testdata</module>
        <module>sansa-rdf</module>
        <module>sansa-datalake</module>
        <module>sansa-sabine</module>
        <module>sansa-query</module>
        <module>sansa-owl</module>
        <module>sansa-inference</module>
        <module>sansa-ml</module>
        <module>sansa-examples</module>
        <module>sansa-integration-tests</module>
        <module>sansa-cmds-picocli</module>
        <module>sansa-spark-cli</module>
        <module>sansa-bench-spark</module>
        <module>sansa-pkg-parent</module>
        <module>sansa-stack</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.binary.version}</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.vladsch.flexmark</groupId>
            <artifactId>flexmark-all</artifactId>
            <scope>test</scope>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>org.scalatest</groupId>-->
        <!--            <artifactId>scalatest-funsuite_${scala.binary.version}</artifactId>-->
        <!--            <scope>test</scope>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.scalatest</groupId>-->
        <!--            <artifactId>scalatest-flatspec_${scala.binary.version}</artifactId>-->
        <!--            <scope>test</scope>-->
        <!--        </dependency>-->
        <!--        <dependency>-->
        <!--            <groupId>org.scalatest</groupId>-->
        <!--            <artifactId>scalatest-shouldmatchers_${scala.binary.version}</artifactId>-->
        <!--            <scope>test</scope>-->
        <!--        </dependency>-->
    </dependencies>


    <reporting>
        <plugins>

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

            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jdepend-maven-plugin</artifactId>
            </plugin>

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

        </plugins>

    </reporting>

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

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

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

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

            <plugin>
                <groupId>com.amashchenko.maven.plugin</groupId>
                <artifactId>gitflow-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
            </plugin>

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

    <profiles>
        <profile>
            <id>source</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>javadoc</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </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>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <failOnError>false</failOnError>
                                </configuration>
                            </execution>
                        </executions>
                        <configuration>
                            <doclint>none</doclint>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>root-dir</id>
            <activation>
                <file>
                    <exists>${project.basedir}/scalastyle-config.xml</exists>
                </file>
            </activation>
            <properties>
                <scalastyle.config.path>${project.basedir}/scalastyle-config.xml</scalastyle.config.path>
            </properties>
        </profile>

        <profile>
            <id>child-dir</id>
            <activation>
                <file>
                    <exists>${project.basedir}/../lib</exists>
                </file>
            </activation>
            <properties>
                <scalastyle.config.path>${project.basedir}/../scalastyle-config.xml</scalastyle.config.path>
            </properties>
        </profile>

        <profile>
            <id>child-child-dir</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <scalastyle.config.path>${project.basedir}/../../scalastyle-config.xml</scalastyle.config.path>
            </properties>
        </profile>
    </profiles>
</project>
