<?xml version="1.0" encoding="UTF-8"?>
<!--
 Copyright 2015 data Artisans GmbH

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<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>com.data-artisans</groupId>
	<artifactId>flink-training-exercises</artifactId>
	<version>0.6</version>
	<packaging>jar</packaging>

	<name>Apache Flink Training Exercises</name>
	<url>dataartisans.github.io/flink-training/</url>

	<inceptionYear>2015</inceptionYear>
	<description>Utilities and material for an Apache Flink Training provided by data Artisans.</description>

	<scm>
		<url>https://github.com/dataArtisans/cascading-flink</url>
		<connection>scm:git:https://github.com/dataArtisans/cascading-flink.git</connection>
	</scm>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<organization>data Artisans</organization>
			<url>http://data-artisans.com/</url>
		</developer>
	</developers>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<slf4j.version>1.7.19</slf4j.version>
		<flink.version>1.1.3</flink.version>
	</properties>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<dependencies>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-java</artifactId>
			<version>${flink.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-scala_2.10</artifactId>
			<version>${flink.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-streaming-java_2.10</artifactId>
			<version>${flink.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-streaming-scala_2.10</artifactId>
			<version>${flink.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-gelly_2.10</artifactId>
			<version>${flink.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-table_2.10</artifactId>
			<version>${flink.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-gelly-scala_2.10</artifactId>
			<version>${flink.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-connector-kafka-0.9_2.10</artifactId>
			<version>${flink.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.flink</groupId>
			<artifactId>flink-connector-elasticsearch2_2.10</artifactId>
			<version>${flink.version}</version>
		</dependency>

		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<version>2.7</version>
		</dependency>

		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-math3</artifactId>
			<version>3.5</version>
		</dependency>

		<dependency>
			<groupId>org.influxdb</groupId>
			<artifactId>influxdb-java</artifactId>
			<version>2.3</version>
		</dependency>

    </dependencies>

	<build>
		<plugins>

			<!-- Scala Compiler -->
			<plugin>
				<groupId>net.alchim31.maven</groupId>
				<artifactId>scala-maven-plugin</artifactId>
				<version>3.1.4</version>
				<executions>
					<!-- Run scala compiler in the process-resources phase, so that dependencies on
						scala classes can be resolved later in the (Java) compile phase -->
					<execution>
						<id>scala-compile-first</id>
						<phase>process-resources</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>

					<!-- Run scala compiler in the process-test-resources phase, so that dependencies on
						 scala classes can be resolved later in the (Java) test-compile phase -->
					<execution>
						<id>scala-test-compile</id>
						<phase>process-test-resources</phase>
						<goals>
							<goal>testCompile</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<jvmArgs>
						<jvmArg>-Xms128m</jvmArg>
						<jvmArg>-Xmx512m</jvmArg>
					</jvmArgs>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version><!--$NO-MVN-MAN-VER$-->
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9.1</version>
				<configuration>
					<quiet>true</quiet>
					<additionalparam>-Xdoclint:none</additionalparam>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.6</version>
				<executions>

					<!-- MBoxParser -->
					<execution>
						<id>MBoxParser</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>

						<configuration>
							<classifier>MBoxParser</classifier>

							<archive>
								<manifestEntries>
									<main-class>com.dataartisans.flinktraining.dataset_preparation.MBoxParser</main-class>
								</manifestEntries>
							</archive>

							<includes>
								<include>**/MBoxParser.class</include>
								<include>**/MBoxParser$*.class</include>
							</includes>
						</configuration>
					</execution>

				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.rat</groupId>
				<artifactId>apache-rat-plugin</artifactId>
				<version>0.10</version><!--$NO-MVN-MAN-VER$-->
				<inherited>false</inherited>
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<excludeSubProjects>false</excludeSubProjects>
					<numUnapprovedLicenses>0</numUnapprovedLicenses>
					<licenses>
						<!-- Enforce this license:
							Copyright 2015 data Artisans GmbH

							Licensed under the Apache License, Version 2.0 (the "License");
							you may not use this file except in compliance with the License.
							You may obtain a copy of the License at

							  http://www.apache.org/licenses/LICENSE-2.0

							Unless required by applicable law or agreed to in writing, software
							distributed under the License is distributed on an "AS IS" BASIS,
							WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
							See the License for the specific language governing permissions and
							limitations under the License.
						-->
						<license implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
							<licenseFamilyCategory>AL2 </licenseFamilyCategory>
							<licenseFamilyName>Apache License 2.0</licenseFamilyName>
							<notes />
							<patterns>
								<pattern>Copyright 2015 data Artisans GmbH</pattern>
								<pattern>Licensed under the Apache License, Version 2.0 (the "License");</pattern>
							</patterns>
						</license>
					</licenses>
					<licenseFamilies>
						<licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily">
							<familyName>Apache License 2.0</familyName>
						</licenseFamily>
					</licenseFamilies>
					<excludes>
						<!-- Additional files like .gitignore etc.-->
						<exclude>**/.*</exclude>
						<exclude>**/*.prefs</exclude>
						<exclude>**/*.properties</exclude>
						<exclude>**/*.log</exclude>
						<exclude>*.txt/**</exclude>
						<!-- Administrative files in the main trunk. -->
						<exclude>**/README.md</exclude>
						<exclude>CHANGELOG</exclude>
						<!-- Build files -->
						<exclude>**/*.iml</exclude>
						<!-- Generated content -->
						<exclude>**/target/**</exclude>
						<exclude>**/build/**</exclude>
					</excludes>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-checkstyle-plugin</artifactId>
				<version>2.12.1</version>
				<executions>
					<execution>
						<id>validate</id>
						<phase>validate</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<configLocation>/tools/maven/checkstyle.xml</configLocation>
					<logViolationsToConsole>true</logViolationsToConsole>
				</configuration>
			</plugin>

		</plugins>
	</build>
	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.5</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
