<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>sansa-query-spark_2.12</artifactId>

    <parent>
        <groupId>net.sansa-stack</groupId>
        <artifactId>sansa-query-parent_2.12</artifactId>
        <version>0.9.0</version>
    </parent>

    <properties>
        <version.owlapi.ontop>5.1.20</version.owlapi.ontop>
    </properties>

    <dependencies>

        <dependency>
            <groupId>net.sansa-stack</groupId>
            <artifactId>sansa-sabine${scala.version.suffix}</artifactId>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sansa-query-tests${scala.version.suffix}</artifactId>
            <scope>test</scope>
            <!--            <type>test-jar</type>-->
            <!--            <classifier>tests</classifier>-->
        </dependency>

        <dependency>
            <groupId>net.sansa-stack</groupId>
            <artifactId>sansa-resource-testdata</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>net.sansa-stack</groupId>
            <artifactId>sansa-test-resources${scala.version.suffix}</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-arq</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-tdb</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>


        <!--
                <dependency>
                    <groupId>org.aksw.jenax</groupId>
                    <artifactId>jena-sparql-api-core</artifactId>
                </dependency>
        -->

        <dependency>
            <groupId>org.aksw.jenax</groupId>
            <artifactId>jenax-annotations-reprogen</artifactId>
        </dependency>

        <!--
                <dependency>
                    <groupId>org.aksw.jena-sparql-api</groupId>
                    <artifactId>jena-sparql-api-virtuoso</artifactId>
                </dependency>
        -->

        <dependency>
            <groupId>org.aksw.jenax</groupId>
            <artifactId>jenax-server-standalone</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aksw.jenax</groupId>
            <artifactId>jenax-analytics-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aksw.jenax</groupId>
            <artifactId>jenax-arq-algebra</artifactId>
        </dependency>

        <!--
                <dependency>
                    <groupId>org.aksw.jena-sparql-api</groupId>
                    <artifactId>jena-sparql-api-views</artifactId>
                </dependency>
        -->

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sansa-rdf-common${scala.version.suffix}</artifactId>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sansa-rdf-spark${scala.version.suffix}</artifactId>
        </dependency>

        <!-- Spark dependencies -->
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-core_${scala.binary.version}</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-sql_${scala.binary.version}</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-graphx_${scala.binary.version}</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-hive_${scala.binary.version}</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>spark-gremlin</artifactId>
            <version>3.6.1</version>
            <exclusions>
                <!-- Conflicts with netty from hadoop-yarn -->
                <exclusion>
                    <groupId>io.netty</groupId>
                    <artifactId>netty</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.spark</groupId>
                    <artifactId>spark-core_2.11</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.scala-lang.modules</groupId>
                    <artifactId>scala-xml_2.11</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>io.github.litmus-benchmark-suite</groupId>
            <artifactId>gremlinator</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>gremlin-groovy</artifactId>
            <version>3.4.8</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tinkerpop</groupId>
            <artifactId>gremlin-core</artifactId>
            <version>3.4.8</version>
        </dependency>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>sansa-datalake-spark${scala.version.suffix}</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>log4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Override transitive tdb version via litmus -->
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>apache-jena-libs</artifactId>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>org.aksw.bsbm</groupId>
            <artifactId>bsbm-core</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Scala -->
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
        </dependency>
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.binary.version}</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.holdenkarau</groupId>
            <artifactId>spark-testing-base_${scala.binary.version}</artifactId>
            <scope>test</scope>
        </dependency>

        <!-- Ontop -->
        <dependency>
            <groupId>net.sansa-stack.thirdparty.it.unibz.inf.ontop</groupId>
            <artifactId>ontop-owlapi</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.jena</groupId>
                    <artifactId>jena-osgi</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.sansa-stack.thirdparty.it.unibz.inf.ontop</groupId>
            <artifactId>ontop-system-sql-owlapi</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.jena</groupId>
                    <artifactId>jena-osgi</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.sansa-stack.thirdparty.it.unibz.inf.ontop</groupId>
            <artifactId>ontop-rdb</artifactId>
            <!--
                        <exclusions>
                            <exclusion>
                                <groupId>org.javabits.jgrapht</groupId>
                                <artifactId>jgrapht-core</artifactId>
                            </exclusion>
                        </exclusions>
            -->
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>2.1.210</version>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>it.unibz.inf.ontop</groupId>-->
        <!--            <artifactId>ontop-sparql-compliance</artifactId>-->
        <!--            <version>${version.ontop}</version>-->
        <!--            <type>test-jar</type>-->
        <!--            <scope>test</scope>-->
        <!--        </dependency>-->
        <!-- need to overwrite OWL API 5 with v4 used by Ontop -->
        <dependency>
            <groupId>net.sourceforge.owlapi</groupId>
            <artifactId>owlapi-api</artifactId>
            <version>${version.owlapi.ontop}</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.owlapi</groupId>
            <artifactId>owlapi-apibinding</artifactId>
            <version>${version.owlapi.ontop}</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.owlapi</groupId>
            <artifactId>owlapi-impl</artifactId>
            <version>${version.owlapi.ontop}</version>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.owlapi</groupId>
            <artifactId>owlapi-parsers</artifactId>
            <version>${version.owlapi.ontop}</version>
        </dependency>

        <dependency>
            <groupId>com.github.owlcs</groupId>
            <artifactId>ontapi</artifactId>
            <version>3.0.0</version>
        </dependency>

        <dependency>
            <groupId>com.twitter</groupId>
            <artifactId>chill_${scala.binary.version}</artifactId>
        </dependency>

        <!--
        <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty</artifactId>
                <version>4.1.42.Final</version>
            </dependency>
        -->

        <!--
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-all</artifactId>
                <version>4.1.42.Final</version>
            </dependency>
        -->

        <dependency>
            <groupId>com.github.scopt</groupId>
            <artifactId>scopt_${scala.binary.version}</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-rdf-jena</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.jena</groupId>
                    <artifactId>jena-osgi</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>shade</id>
            <!-- <id>dist</id> -->
            <!--
                <properties>
                    <spark.deps.scope>provided</spark.deps.scope>
                </properties>
            -->
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-shade-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>shade</goal>
                                </goals>
                                <configuration>
                                    <artifactSet>
                                        <excludes>
                                            <exclude>org.apache.hadoop:*</exclude>
                                            <exclude>org.apache.spark:*</exclude>
                                        </excludes>
                                    </artifactSet>

                                    <relocations>
                                        <relocation>
                                            <pattern>com.google</pattern>
                                            <shadedPattern>net.sansa_stack.ext.com.google</shadedPattern>
                                        </relocation>
                                    </relocations>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <!-- <sourceDirectory>src/main/java</sourceDirectory> -->
    <!-- <sourceDirectory>src/main/scala</sourceDirectory> -->
    <!--
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                </plugin>

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

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

    <build>
        <!--
        <plugins>
            <plugin>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest-maven-plugin</artifactId>
                <configuration>
                    <argLine>-Dlog4j.configuration=log4j-sansa.properties</argLine>
                </configuration>
            </plugin>
        </plugins>
        -->
    </build>

</project>

