<?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.2.0</version>
  <packaging>pom</packaging>
  <name>Inference API - Parent</name>

  <description>An inference layer for RDF and OWL</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/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:https://github.com/SANSA-Stack/SANSA-Inference.git</connection>
    <url>https://github.com/SANSA-Stack/SANSA-Inference</url>
    <developerConnection>scm:git:https://github.com/SANSA-Stack/SANSA-Inference.git</developerConnection>
  </scm>


  <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>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <scala.version>2.11.8</scala.version>
    <scala.binary.version>2.11</scala.binary.version>
    <spark.version>2.1.1</spark.version>
    <flink.version>1.3.0</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-1</jsa.subversion>
    <jsa.version>${jena.version}-${jsa.subversion}</jsa.version>
    <PermGen>64m</PermGen>
    <MaxPermGen>512m</MaxPermGen>
    <CodeCacheSize>512m</CodeCacheSize>
  </properties>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <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.1</version>
      </dependency>
      <dependency>
        <groupId>org.jgrapht</groupId>
        <artifactId>jgrapht-ext</artifactId>
        <version>1.0.1</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.12.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.3</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>21.0</version>
      </dependency>

      <!-- Shapeless lib -->
      <dependency>
        <groupId>com.chuusai</groupId>
        <artifactId>shapeless_${scala.binary.version}</artifactId>
        <version>2.3.2</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.2</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>
		  <arg>-Xmax-classfile-name</arg>
                  <arg>128</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.1</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.20</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.5.0</version>

          <configuration>
            <installProject>false</installProject>
            <verbose>false</verbose>

            <gitFlowConfig>
              <productionBranch>master</productionBranch>
              <developmentBranch>develop</developmentBranch>
              <featureBranchPrefix>feature/</featureBranchPrefix>
              <releaseBranchPrefix>release/</releaseBranchPrefix>
              <hotfixBranchPrefix>hotfix/</hotfixBranchPrefix>
              <supportBranchPrefix>support/</supportBranchPrefix>
              <versionTagPrefix>v</versionTagPrefix>
              <origin>origin</origin>
            </gitFlowConfig>
          </configuration>
        </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>3.0.0</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>
        <plugin>
          <groupId>com.versioneye</groupId>
          <artifactId>versioneye-maven-plugin</artifactId>
          <version>3.11.2</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.4</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>

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

        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>

        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>com.versioneye</groupId>
        <artifactId>versioneye-maven-plugin</artifactId>
      </plugin>
      <!--<plugin>-->
        <!--<groupId>org.scalastyle</groupId>-->
        <!--<artifactId>scalastyle-maven-plugin</artifactId>-->
        <!--<version>0.8.0</version>-->
        <!--<configuration>-->
          <!--<verbose>false</verbose>-->
          <!--<failOnViolation>false</failOnViolation>-->
          <!--<includeTestSourceDirectory>false</includeTestSourceDirectory>-->
          <!--<failOnWarning>false</failOnWarning>-->
          <!--<sourceDirectory>${basedir}/src/main/scala</sourceDirectory>-->
          <!--<testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>-->
          <!--<configLocation>scalastyle-config.xml</configLocation>-->
          <!--<outputFile>${basedir}/target/scalastyle-output.xml</outputFile>-->
          <!--<inputEncoding>${project.build.sourceEncoding}</inputEncoding>-->
          <!--<outputEncoding>${project.reporting.outputEncoding}</outputEncoding>-->
        <!--</configuration>-->
        <!--<executions>-->
          <!--<execution>-->
            <!--<goals>-->
              <!--<goal>check</goal>-->
            <!--</goals>-->
          <!--</execution>-->
        <!--</executions>-->
      <!--</plugin>-->
    </plugins>
  </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>

    <!-- the profile used for deployment to Sonatype Maven repository -->
    <profile>
      <id>ossrh</id>
      <distributionManagement>
        <repository>
          <id>ossrh</id>
          <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
      </distributionManagement>
      <build>
        <plugins>
          <plugin>
            <groupId>net.alchim31.maven</groupId>
            <artifactId>scala-maven-plugin</artifactId>
            <version>3.2.2</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>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>doc-jar</goal>
                </goals>
              </execution>
            </executions>

          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <phase>verify</phase>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <keyname>AKSW</keyname>
                  <passphraseServerId>${gpg.keyname}</passphraseServerId>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.8</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>true</autoReleaseAfterClose>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>



</project>
