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

	<groupId>net.sansa-stack</groupId>
	<artifactId>sansa-rdf-parent</artifactId>
	<version>0.1.0</version>
	<packaging>pom</packaging>

	<!-- <name>SANSA Stack - RDF Layer</name> -->
	<!-- <description>RDF Spark Library</description> -->
	<inceptionYear>2015</inceptionYear>

	<properties>
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<encoding>UTF-8</encoding>

		<scala.version>2.11.7</scala.version>
		<scala.compat.version>2.11</scala.compat.version>
		<scala.classifier>${scala.compat.version}</scala.classifier>
		<flink.version>1.1.3</flink.version>
		<spark.version>2.0.1</spark.version>
		<jena.version>3.1.1</jena.version>
		<jsa.subversion>1</jsa.subversion>

		<jsa.version>${jena.version}-${jsa.subversion}</jsa.version>
	</properties>

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

	<modules>
		<module>sansa-rdf-partition-parent</module>
		<module>sansa-rdf-spark-parent</module>
		<module>sansa-rdf-kryo-parent</module>
		<module>sansa-rdf-flink</module>
	</modules>

	<dependencyManagement>
		<dependencies>

			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>sansa-rdf-kryo-jena</artifactId>
				<version>${project.version}</version>
				<!-- <classifier>${scala.classifier}</classifier> -->
			</dependency>

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

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

			<dependency>
				<groupId>${project.groupId}</groupId>
				<artifactId>sansa-rdf-partition-core</artifactId>
				<version>${project.version}</version>
				<!-- <classifier>${scala.classifier}</classifier> -->
			</dependency>

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


			<!-- <dependency> -->
			<!-- <groupId>${project.groupId}</groupId> -->
			<!-- <artifactId>sansa-rdf-common-partition-core_${scala.compat.version}</artifactId> -->
			<!-- <version>${project.version}</version> -->
			<!-- </dependency> -->

			<dependency>
				<groupId>org.aksw.sparqlify</groupId>
				<artifactId>sparqlify-core</artifactId>
				<version>0.8.0</version>
				<exclusions>
					<exclusion>
						<groupId>org.aksw.sparqlify</groupId>
						<artifactId>sparqlify-tests</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.apache.hive</groupId>
						<artifactId>hive-jdbc</artifactId>
					</exclusion>
					<exclusion>
						<groupId>org.springframework.batch</groupId>
						<artifactId>spring-batch-infrastructure</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<!-- Test -->
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.11</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.apache.jena</groupId>
				<artifactId>jena-core</artifactId>
				<version>${jena.version}</version>
			</dependency>

			<!-- Jena's (newer) vesion of jackson conflicts with hadoop's and causes
				it to crash -->
			<dependency>
				<groupId>org.apache.jena</groupId>
				<artifactId>jena-arq</artifactId>
				<version>${jena.version}</version>
				<exclusions>
					<exclusion>
						<groupId>com.fasterxml.jackson.core</groupId>
						<artifactId>jackson-core</artifactId>
					</exclusion>
					<exclusion>
						<groupId>com.fasterxml.jackson.core</groupId>
						<artifactId>jackson-databind</artifactId>
					</exclusion>
					<exclusion>
						<groupId>com.fasterxml.jackson.core</groupId>
						<artifactId>jackson-annotations</artifactId>
					</exclusion>
				</exclusions>
			</dependency>

			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-compress</artifactId>
				<version>1.0</version>
			</dependency>

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

			<dependency>
				<groupId>de.javakaffee</groupId>
				<artifactId>kryo-serializers</artifactId>
				<version>0.41</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<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.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>com.amashchenko.maven.plugin</groupId>
				<artifactId>gitflow-maven-plugin</artifactId>
			</plugin>
			<!-- <sourceDirectory>src/main/scala</sourceDirectory> -->
			<!-- <testSourceDirectory>src/test/scala</testSourceDirectory> -->
		</plugins>

		<pluginManagement>
			<plugins>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.6.0</version>
					<configuration>
						<source>${maven.compiler.source}</source>
						<target>${maven.compiler.target}</target>
					</configuration>
				</plugin>

				<plugin>
					<groupId>net.alchim31.maven</groupId>
					<artifactId>scala-maven-plugin</artifactId>
					<version>3.2.2</version>
					<!-- <configuration> -->
					<!-- <recompileMode>incremental</recompileMode> -->
					<!-- </configuration> -->
					<executions>
						<execution>
							<goals>
								<goal>add-source</goal>
								<goal>compile</goal>
								<goal>testCompile</goal>
							</goals>
						</execution>
						<!-- <execution> -->
						<!-- <goals> -->
						<!-- <goal>add-source</goal> -->
						<!-- <configuration> -->
						<!-- <sourceDir>src/main/scala</sourceDir> -->
						<!-- <testSourceDir>src/main/test</testSourceDir> -->
						<!-- </configuration> -->
						<!-- </goals> -->
						<!-- </execution> -->
					</executions>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.18.1</version>
					<configuration>
						<useFile>false</useFile>
						<disableXmlReport>true</disableXmlReport>
						<!-- If you have classpath issue like NoDefClassError,... -->
						<!-- useManifestOnlyJar>false</useManifestOnlyJar -->
						<includes>
							<include>**/*Test.*</include>
							<include>**/*Suite.*</include>
						</includes>
					</configuration>
				</plugin>

				<plugin>
					<groupId>com.amashchenko.maven.plugin</groupId>
					<artifactId>gitflow-maven-plugin</artifactId>
					<version>1.3.1</version>
					<configuration>
						<gitFlowConfig>
							<versionTagPrefix>v</versionTagPrefix>
						</gitFlowConfig>
						<pushRemote>false</pushRemote>
					</configuration>
				</plugin>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>2.4.3</version>
					<executions>
						<!-- Run shade goal on package phase -->
						<execution>
							<phase>package</phase>
							<goals>
								<goal>shade</goal>
							</goals>
							<configuration>
								<shadedArtifactAttached>true</shadedArtifactAttached>
								<shadedClassifierName>jar-with-dependencies</shadedClassifierName>
								<filters>
									<filter>
										<artifact>*:*</artifact>
										<excludes>
											<exclude>META-INF/*.SF</exclude>
											<exclude>META-INF/*.DSA</exclude>
											<exclude>META-INF/*.RSA</exclude>
										</excludes>
									</filter>
								</filters>
								<transformers>
									<transformer
										implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
									<!-- add Main-Class to manifest file -->
									<!-- <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> -->
									<!-- <mainClass>com.mkyong.core.utils.App</mainClass> -->
									<!-- </transformer> -->
								</transformers>
							</configuration>
						</execution>
					</executions>
				</plugin>

				<!--This plugin's configuration is used to store Eclipse m2e settings
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											net.alchim31.maven
										</groupId>
										<artifactId>
											scala-maven-plugin
										</artifactId>
										<versionRange>
											[3.2.0,)
										</versionRange>
										<goals>
											<goal>testCompile</goal>
											<goal>compile</goal>
											<goal>add-source</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>

			</plugins>
		</pluginManagement>
	</build>


	<distributionManagement>
<!--
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
-->
		<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>

	<profiles>
		<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>
						<version>2.9.1</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
								<configuration>
									<failOnError>false</failOnError>
								</configuration>
							</execution>
						</executions>
						<configuration>
							<additionalparam>-Xdoclint:none</additionalparam>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>release</id>
			<build>
				<plugins>
					<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>
				</plugins>
			</build>
		</profile>
	</profiles>

	<repositories>
		<!-- <repository> -->
		<!-- <id>Akka repository</id> -->
		<!-- <url>http://repo.akka.io/releases</url> -->
		<!-- </repository> -->
		<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>

</project>
