<?xml version="1.0" encoding="UTF-8"?>
<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>net.sansa-stack</groupId>
  <artifactId>sansa-inference-parent_2.11</artifactId>
  <version>0.1.0</version>
  <packaging>pom</packaging>
  <name>Inference API - Parent</name>

  <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>GNU GENERAL PUBLIC LICENSE, Version 3</name>
      <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>lorenz</id>
      <name>Lorenz Buehmann</name>
      <email>buehmann@informatik.uni-leipzig.de</email>
      <organization>AKSW, Department of Computer Science, University of Leipzig</organization>
      <organizationUrl>http://www.aksw.org</organizationUrl>
      <roles>
        <role>developer</role>
      </roles>
      <timezone>0</timezone>
    </developer>
  </developers>

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

  <modules>
    <module>sansa-inference-common</module>
    <module>sansa-inference-flink</module>
    <module>sansa-inference-spark</module>
    <module>sansa-inference-tests</module>
  </modules>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.version>>=3.0</maven.version>
    <!--<java.version>>=1.8</java.version>-->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <scala.version>2.11.8</scala.version>
    <scala.binary.version>2.11</scala.binary.version>
    <spark.version>2.0.2</spark.version>
    <flink.version>1.1.3</flink.version>
    <jena.version>3.1.1</jena.version>
    <sansa.stack.version>0.1.0-SNAPSHOT</sansa.stack.version>
    <sansa.rdf.version>${sansa.stack.version}</sansa.rdf.version>
    <sansa.query.version>${sansa.stack.version}</sansa.query.version>
    <sansa.owl.version>${sansa.stack.version}</sansa.owl.version>
    <jsa.subversion>1-SNAPSHOT</jsa.subversion>
    <jsa.version>${jena.version}-${jsa.subversion}</jsa.version>
    <PermGen>64m</PermGen>
    <MaxPermGen>512m</MaxPermGen>
    <CodeCacheSize>512m</CodeCacheSize>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- RDF Layer -->
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>sansa-rdf-spark-core</artifactId>
        <version>${sansa.rdf.version}</version>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>sansa-rdf-partition-core</artifactId>
        <version>${sansa.rdf.version}</version>
      </dependency>

      <!-- Query Layer -->
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>sansa-query-spark-sparqlify</artifactId>
        <version>${sansa.query.version}</version>
      </dependency>
      <dependency>
        <groupId>org.aksw.jena-sparql-api</groupId>
        <artifactId>jena-sparql-api-server-standalone</artifactId>
        <version>${jsa.version}</version>
        <exclusions>
          <exclusion>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-xml</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- Scala -->
      <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>${scala.version}</version>
      </dependency>

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

      <!-- Apache Flink -->
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-scala_${scala.binary.version}</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-streaming-scala_${scala.binary.version}</artifactId>
        <version>${flink.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.flink</groupId>
        <artifactId>flink-clients_${scala.binary.version}</artifactId>
        <version>${flink.version}</version>
      </dependency>

      <!-- Apache JENA 3.x-->
      <dependency>
        <groupId>org.apache.jena</groupId>
        <artifactId>jena-core</artifactId>
        <version>${jena.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.jena</groupId>
        <artifactId>jena-arq</artifactId>
        <version>${jena.version}</version>
      </dependency>

      <!-- Graph API -->
      <dependency>
        <groupId>com.assembla.scala-incubator</groupId>
        <artifactId>graph-core_${scala.binary.version}</artifactId>
        <version>1.10.0</version>
      </dependency>
      <dependency>
        <groupId>com.assembla.scala-incubator</groupId>
        <artifactId>graph-dot_${scala.binary.version}</artifactId>
        <version>1.9.0</version>
      </dependency>
      <dependency>
        <groupId>org.jgrapht</groupId>
        <artifactId>jgrapht-core</artifactId>
        <version>1.0.0</version>
      </dependency>
      <dependency>
        <groupId>org.jgrapht</groupId>
        <artifactId>jgrapht-ext</artifactId>
        <version>1.0.0</version>
      </dependency>
      <dependency>
        <groupId>org.gephi</groupId>
        <artifactId>gephi-toolkit</artifactId>
        <version>0.9.1</version>
      </dependency>

        <!-- Apache Calcite -->
        <dependency>
            <groupId>org.apache.calcite</groupId>
            <artifactId>calcite-core</artifactId>
            <version>1.10.0</version>
        </dependency>

      <!-- Test -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest_${scala.binary.version}</artifactId>
        <version>3.0.1</version>
        <scope>test</scope>
      </dependency>

      <!-- Logging -->
      <dependency>
        <groupId>com.typesafe.scala-logging</groupId>
        <artifactId>scala-logging_${scala.binary.version}</artifactId>
        <version>3.5.0</version>
      </dependency>

      <!-- Guava -->
      <dependency>
        <groupId>com.google.guava</groupId>
        <artifactId>guava</artifactId>
        <version>19.0</version>
      </dependency>

      <!-- Shapeless lib -->
      <dependency>
        <groupId>com.chuusai</groupId>
        <artifactId>shapeless_${scala.binary.version}</artifactId>
        <version>2.3.0</version>
      </dependency>

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


    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_${scala.binary.version}</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <!-- Scala Maven -->
        <plugin>
          <groupId>net.alchim31.maven</groupId>
          <artifactId>scala-maven-plugin</artifactId>
          <version>3.2.1</version>
          <executions>
            <execution>
              <goals>
                <goal>compile</goal>
                <goal>testCompile</goal>
              </goals>
              <configuration>
                <scalaVersion>${scala.version}</scalaVersion>
                <recompileMode>incremental</recompileMode>
                <useZincServer>true</useZincServer>
                <args>
                  <arg>-unchecked</arg>
                  <arg>-deprecation</arg>
                  <arg>-feature</arg>
                  <arg>-dependencyfile</arg>
                  <arg>${project.build.directory}/.scala_dependencies</arg>
                </args>
                <jvmArgs>
                  <jvmArg>-Xms1024m</jvmArg>
                  <jvmArg>-Xmx1024m</jvmArg>
                  <jvmArg>-XX:PermSize=${PermGen}</jvmArg>
                  <jvmArg>-XX:MaxPermSize=${MaxPermGen}</jvmArg>
                  <jvmArg>-XX:ReservedCodeCacheSize=${CodeCacheSize}</jvmArg>
                </jvmArgs>
                <!--<javacArgs>-->
                  <!--<javacArg>-source</javacArg>-->
                  <!--<javacArg>${java.version}</javacArg>-->
                  <!--<javacArg>-target</javacArg>-->
                  <!--<javacArg>${java.version}</javacArg>-->
                  <!--<javacArg>-Xlint:all,-serial,-path</javacArg>-->
                <!--</javacArgs>-->

              </configuration>
            </execution>
          </executions>
          <configuration>
            <scalaVersion>${scala.version}</scalaVersion>
            <recompileMode>incremental</recompileMode>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.0</version>
          <configuration>
            <source>${maven.compiler.source}</source>
            <target>${maven.compiler.target}</target>
            <encoding>${project.build.sourceEncoding}</encoding>
          </configuration>
        </plugin>

        <!-- Surefire -->
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.19.1</version>
        </plugin>

        <!-- Scalatest -->
        <plugin>
          <groupId>org.scalatest</groupId>
          <artifactId>scalatest-maven-plugin</artifactId>
          <version>1.0</version>
          <configuration>
            <tagsToExclude>net.sansa_stack.test.conformance.IntegrationTestSuite</tagsToExclude>
          </configuration>
        </plugin>

        <!-- Gitflow -->
        <plugin>
          <groupId>com.amashchenko.maven.plugin</groupId>
          <artifactId>gitflow-maven-plugin</artifactId>
          <version>1.3.1</version>
        </plugin>
        <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.3</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>1.4.1</version>
          <executions>
            <execution>
              <id>enforce-versions</id>
              <goals>
                <goal>enforce</goal>
              </goals>
              <configuration>
                <rules>
                  <requireMavenVersion>
                    <version>${maven.version}</version>
                  </requireMavenVersion>
                  <!--<requireJavaVersion>-->
                    <!--<version>${java.version}</version>-->
                  <!--</requireJavaVersion>-->
                  <bannedDependencies>
                    <excludes>
                      <!--
                        Akka depends on io.netty:netty, which puts classes under the org.jboss.netty
                        package. This conflicts with the classes in org.jboss.netty:netty
                        artifact, so we have to ban that artifact here. In Netty 4.x, the classes
                        are under the io.netty package, so it's fine for us to depend on both
                        io.netty:netty and io.netty:netty-all.
                      -->
                      <exclude>org.jboss.netty</exclude>
                      <exclude>org.codehaus.groovy</exclude>
                    </excludes>
                    <searchTransitive>true</searchTransitive>
                  </bannedDependencies>
                </rules>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.5</version>
          <executions>
            <execution>
              <id>add-source</id>
              <phase>generate-sources</phase>
              <goals>
                <goal>add-source</goal>
              </goals>
              <configuration>
                <sources>
                  <source>src/main/scala_${scala.binary.version}</source>
                </sources>
              </configuration>
            </execution>
          </executions>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <distributionManagement>
    <repository>
      <id>maven.aksw.internal</id>
      <name>AKSW Release Repository</name>
      <url>http://maven.aksw.org/archiva/repository/internal</url>
    </repository>
    <snapshotRepository>
      <id>maven.aksw.snapshots</id>
      <name>AKSW Snapshot Repository</name>
      <url>http://maven.aksw.org/archiva/repository/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>oss-sonatype</id>
      <name>oss-sonatype</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>apache-snapshot</id>
      <name>Apache repository (snapshots)</name>
      <url>https://repository.apache.org/content/repositories/snapshots/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>maven.aksw.snapshots</id>
      <name>AKSW Snapshot Repository</name>
      <url>http://maven.aksw.org/archiva/repository/snapshots</url>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>

  <profiles>
    <profile>
      <id>scala-2.10</id>
      <activation>
        <property><name>scala-2.10</name></property>
      </activation>
      <properties>
        <scala.version>2.10.6</scala.version>
        <scala.binary.version>2.10</scala.binary.version>
        <jline.version>${scala.version}</jline.version>
        <jline.groupid>org.scala-lang</jline.groupid>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce-versions</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <bannedDependencies>
                      <excludes combine.children="append">
                        <exclude>*:*_2.11</exclude>
                      </excludes>
                    </bannedDependencies>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>scala-2.11</id>
      <activation>
        <property><name>!scala-2.10</name></property>
      </activation>
      <properties>
        <scala.version>2.11.8</scala.version>
        <scala.binary.version>2.11</scala.binary.version>
        <jline.version>2.12.1</jline.version>
        <jline.groupid>jline</jline.groupid>
      </properties>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>enforce-versions</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <configuration>
                  <rules>
                    <bannedDependencies>
                      <excludes combine.children="append">
                        <exclude>*:*_2.10</exclude>
                      </excludes>
                    </bannedDependencies>
                  </rules>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>


</project>