<?xml version="1.0" encoding="UTF-8"?>

<!--
  ~ Copyright 2018 ABSA Group Limited
  ~
  ~ 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <artifactId>atum_2.11</artifactId>
    <packaging>jar</packaging>

    <parent>
        <groupId>za.co.absa</groupId>
        <artifactId>atum-parent_2.11</artifactId>
        <version>3.7.0</version>
    </parent>

    <properties>
        <scalastyle.configLocation>${project.parent.basedir}/scalastyle-config.xml</scalastyle.configLocation>
    </properties>

    <dependencies>
        <!-- Atum -->
        <dependency>
            <groupId>za.co.absa</groupId>
            <artifactId>atum-model_${scala.binary.version}</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>za.co.absa.commons</groupId>
            <artifactId>commons_${scala.binary.version}</artifactId>
            <version>${commons.version}</version>
        </dependency>

        <dependency>
            <groupId>commons-configuration</groupId>
            <artifactId>commons-configuration</artifactId>
            <version>1.6</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.5</version>
        </dependency>

        <dependency>
            <groupId>com.typesafe</groupId>
            <artifactId>config</artifactId>
            <version>${typesafe.config.version}</version>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-scala_${scala.binary.version}</artifactId>
            <version>${mockito.scala.version}</version>
            <scope>test</scope>
        </dependency>

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

        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-minicluster</artifactId>
            <version>${hadoop.version}</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <directory>${project.basedir}/target/${scala.binary.version}</directory>
        <outputDirectory>${project.build.directory}/classes</outputDirectory>
        <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>

        <sourceDirectory>src/main/scala</sourceDirectory>
        <testSourceDirectory>src/test/scala</testSourceDirectory>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.scalastyle</groupId>
                <artifactId>scalastyle-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>scala-2.11</id>
            <properties>
                <scala.binary.version>2.11</scala.binary.version>
                <scala.version>${scala_2.11.version}</scala.version>
            </properties>
        </profile>
        <profile>
            <id>scala-2.12</id>
            <properties>
                <scala.binary.version>2.12</scala.binary.version>
                <scala.version>${scala_2.12.version}</scala.version>
            </properties>
        </profile>
    </profiles>

</project>
