<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2015 Otto (GmbH & Co KG)
  ~
  ~  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:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>io.flinkspector</groupId>
    <artifactId>flinkspector-parent_2.11</artifactId>
    <version>0.9.2</version>

    <name>Flinkspector</name>
    <description>Lightweight integration tests for Apache Flink</description>
    <url>https://github.com/ottogroup/flink-spector</url>

    <scm>
        <url>https://github.com/ottogroup/flink-spector</url>
    </scm>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>alex</id>
            <name>Alexander Kolb</name>
            <email>alexander.kolb@ottogroup.com</email>
            <organization>ottogroup</organization>
            <organizationUrl>http://www.ottogroup.com</organizationUrl>
        </developer>
    </developers>

    <modules>
        <module>flinkspector-core</module>
        <module>flinkspector-dataset</module>
        <module>flinkspector-datastream</module>
    </modules>

    <properties>
        <flink.version>1.7.0</flink.version>
        <log4j.configuration>log4j-test.properties</log4j.configuration>
        <slf4j.version>1.7.7</slf4j.version>
        <guava.version>20.0</guava.version>
        <!-- Default scala versions, may be overwritten by build profiles -->
        <scala.version>2.11.11</scala.version>
        <scala.binary.version>2.11</scala.binary.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <maven-shade-plugin.version>3.1.1</maven-shade-plugin.version>
        <shade.guava-package>io.flinkspector.shade.com.google.common</shade.guava-package>
    </properties>

    <packaging>pom</packaging>

    <dependencies>
        <!--disruptor-->
        <dependency>
            <groupId>com.lmax</groupId>
            <artifactId>disruptor</artifactId>
            <version>3.3.6</version>
        </dependency>
        <!-- flink -->
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-runtime_${scala.binary.version}</artifactId>
            <version>${flink.version}</version>
            <type>test-jar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.flink</groupId>
            <artifactId>flink-test-utils_${scala.binary.version}</artifactId>
            <version>${flink.version}</version>
        </dependency>

        <!-- test -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
        </dependency>
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.binary.version}</artifactId>
            <version>3.0.2</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.9.5</version>
            <type>jar</type>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- -DperformRelease=true -->
    <profiles>
        <profile>
            <id>release-sign-doc-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <!-- java doc -->
                    <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>
                            </execution>
                        </executions>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>3.2.2</version>
                    <configuration>
                        <recompileMode>incremental</recompileMode>
                        <javacArgs>
                            <javacArg>-source</javacArg>
                            <javacArg>1.8</javacArg>
                            <javacArg>-target</javacArg>
                            <javacArg>1.8</javacArg>
                        </javacArgs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.20</version>
                    <configuration>
                        <!-- Travis build workaround -->
                        <argLine>-Xms1024m -Xmx2048m</argLine>
                        <reuseForks>false</reuseForks>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>


        <plugins>
            <plugin>
                <!--
                This plugin can package the main artifact's sources (src/main/java)
                -->
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <!-- just define the Java version to be used for compiling and plugins -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version><!--$NO-MVN-MAN-VER$-->
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <!-- The output of Xlint is not shown by default, but we activate it for the QA bot
                    to be able to get more warnings -->
                    <compilerArgument>-Xlint:all</compilerArgument>
                </configuration>
            </plugin>
        </plugins>

    </build>

    <distributionManagement>
        <repository>
            <id>bintray-ottogroup-maven</id>
            <url>https://api.bintray.com/maven/ottogroup/maven/flinkspector-io</url>
        </repository>
    </distributionManagement>

</project>
