<?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/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <version>0.5.22</version>

    <parent>
        <groupId>za.co.absa</groupId>
        <artifactId>root-pom</artifactId>
        <version>1.0.0</version>
    </parent>

    <artifactId>hyperdrive-trigger</artifactId>
    <packaging>war</packaging>

    <name>hyperdrive-trigger</name>
    <description>Hyperdrive-Trigger is a scheduler and GUI for hyperdrive.</description>
    <url>https://github.com/AbsaOSS/hyperdrive-trigger</url>

    <scm>
        <url>${scm.url}</url>
        <connection>${scm.connection}</connection>
        <developerConnection>${scm.developerConnection}</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <developers>
        <developer>
            <id>jozefbakus</id>
            <name>Jozef Bakus</name>
            <timezone>Europe/Prague</timezone>
            <url>https://github.com/jozefbakus</url>
        </developer>
        <developer>
            <id>kevinwallimann</id>
            <name>Kevin Wallimann</name>
            <timezone>Europe/Prague</timezone>
            <url>https://github.com/kevinwallimann</url>
        </developer>
        <developer>
            <id>senelesithole</id>
            <name>Senele Sithole</name>
            <timezone>Africa/Johannesburg</timezone>
            <url>https://github.com/senelesithole</url>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <scala.compat.version>2.12</scala.compat.version>
        <spark.version>2.4.4</spark.version>
        <hadoop.version>2.7.3</hadoop.version>
        <hadoop.scope>provided</hadoop.scope>
        <slick.version>3.3.3</slick.version>
        <tminglei.version>0.19.6</tminglei.version>
        <slick-hikaricp.version>3.3.1</slick-hikaricp.version>
        <postgresql>42.5.1</postgresql>
        <kafka.version>2.2.0</kafka.version>
        <embedded.kafka.version>2.2.0</embedded.kafka.version>
        <commons.configuration2.version>2.8.0</commons.configuration2.version>
        <play-json.version>2.7.3</play-json.version>
        <play-ws-standalone.version>2.0.3</play-ws-standalone.version>
        <play-ahc-ws-standalone.version>2.0.2</play-ahc-ws-standalone.version>
        <jackson-module.version>2.11.0</jackson-module.version>
        <alchim31>3.2.0</alchim31>
        <spring.version>2.6.6</spring.version>
        <quartz.version>2.3.2</quartz.version>
        <log4j.version>2.17.1</log4j.version>
        <slf4j.log4j2.version>1.7.26</slf4j.log4j2.version>
        <scala-logging.version>3.9.5</scala-logging.version>
        <spring.security.ldap.version>5.6.1</spring.security.ldap.version>
        <spring.kerberos.version>1.0.1.RELEASE</spring.kerberos.version>
        <scalatest.version>3.0.5</scalatest.version>
        <h2database.version>2.1.210</h2database.version>
        <testcontainers.postgresql.version>1.15.3</testcontainers.postgresql.version>
        <mockito.version>2.25.0</mockito.version>
        <cron-expression-descriptor.version>1.2</cron-expression-descriptor.version>
        <node.version>16.17.1</node.version>
        <npm.version>8.15.0</npm.version>
        <scala-maven-plugin.version>3.2.1</scala-maven-plugin.version>
        <maven-resources-plugin.version>3.1.0</maven-resources-plugin.version>
        <maven.ant.plugin.version>1.8</maven.ant.plugin.version>
        <maven-surefire-plugin.version>2.22.2</maven-surefire-plugin.version>
        <scalatest-maven-plugin.version>2.0.0</scalatest-maven-plugin.version>
        <frontend.maven.plugin.version>1.9.0</frontend.maven.plugin.version>
        <maven.war.plugin.version>2.6</maven.war.plugin.version>
        <git.commit.id.maven.plugin.version>4.9.10</git.commit.id.maven.plugin.version>
        <commons.lang3.version>3.11</commons.lang3.version>
        <javamelody.spring.boot.starter.version>1.87.0</javamelody.spring.boot.starter.version>
        <buildnumber.maven.plugin.version>1.4</buildnumber.maven.plugin.version>
        <liquibase-maven-plugin.version>3.10.2</liquibase-maven-plugin.version>
        <snakeyaml.version>1.33</snakeyaml.version>
        <commons-validator.version>1.7</commons-validator.version>
        <hibernate.validator.version>6.2.0.Final</hibernate.validator.version>
        <aws.java.sdk.bom.version>1.12.29</aws.java.sdk.bom.version>
        <absa.commons.version>1.0.3</absa.commons.version>
        <hadoop-aws.version>2.7.3.2.6.1.0-129</hadoop-aws.version>
        <aws-java-sdk-bundle.version>1.11.375</aws-java-sdk-bundle.version>
        <!-- Deployment -->
        <gpg.plugin.version>1.6</gpg.plugin.version>
        <nexus.staging.plugin.version>1.6.8</nexus.staging.plugin.version>
        <maven.release.plugin.version>2.5.3</maven.release.plugin.version>
        <dockerfile.imageName>hyperdrive-trigger</dockerfile.imageName>
        <dockerfile.versionTagSuffix>-${git.commit.id.full}</dockerfile.versionTagSuffix>

        <skipNpmTests>${skipTests}</skipNpmTests>
        <scalatest.suites />
        <scalatest.tagsToExclude>za.co.absa.hyperdrive.trigger.testdata.PersistingData</scalatest.tagsToExclude>
        <skip.postgres.tests>true</skip.postgres.tests>

        <scm.url><!-- defined outside the pom --></scm.url>
        <scm.connection><!-- defined outside the pom --></scm.connection>
        <scm.developerConnection><!-- defined outside the pom --></scm.developerConnection>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.amazonaws</groupId>
                <artifactId>aws-java-sdk-bom</artifactId>
                <version>${aws.java.sdk.bom.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-to-slf4j</artifactId>
            <version>${log4j.version}</version>
        </dependency>
        <dependency>
            <groupId>com.typesafe.scala-logging</groupId>
            <artifactId>scala-logging_${scala.compat.version}</artifactId>
            <version>${scala-logging.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.scalatestplus</groupId>
                    <artifactId>mockito-3-4_2.12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.scalatest</groupId>
                    <artifactId>scalatest_2.12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.scala-lang</groupId>
                    <artifactId>scala-library</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.scala-lang</groupId>
                    <artifactId>scala-reflect</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-scala_${scala.compat.version}</artifactId>
            <version>${jackson-module.version}</version>
        </dependency>
        <dependency>
            <groupId>com.typesafe.slick</groupId>
            <artifactId>slick_${scala.compat.version}</artifactId>
            <version>${slick.version}</version>
        </dependency>
        <dependency>
            <groupId>com.typesafe.slick</groupId>
            <artifactId>slick-hikaricp_${scala.compat.version}</artifactId>
            <version>${slick-hikaricp.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.tminglei</groupId>
            <artifactId>slick-pg_${scala.compat.version}</artifactId>
            <version>${tminglei.version}</version>
        </dependency>
        <dependency>
            <groupId>com.github.tminglei</groupId>
            <artifactId>slick-pg_play-json_${scala.compat.version}</artifactId>
            <version>${tminglei.version}</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${postgresql}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.kafka</groupId>
            <artifactId>kafka_${scala.compat.version}</artifactId>
            <version>${kafka.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-configuration2</artifactId>
            <version>${commons.configuration2.version}</version>
        </dependency>

        <!-- Dependencies for Spark InProcessLauncher -->
        <dependency>
            <groupId>org.apache.spark</groupId>
            <artifactId>spark-yarn_${scala.compat.version}</artifactId>
            <version>${spark.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>javax.validation</groupId>
                    <artifactId>validation-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.hadoop</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-yarn-api</artifactId>
            <version>${hadoop.version}</version>
            <scope>${hadoop.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-yarn-common</artifactId>
            <version>${hadoop.version}</version>
            <scope>${hadoop.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-yarn-server-common</artifactId>
            <version>${hadoop.version}</version>
            <scope>${hadoop.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-yarn-client</artifactId>
            <version>${hadoop.version}</version>
            <scope>${hadoop.scope}</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-client</artifactId>
            <version>${hadoop.version}</version>
            <scope>${hadoop.scope}</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.code.gson</groupId>
                    <artifactId>gson</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-beanutils</groupId>
                    <artifactId>commons-beanutils-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- End Dependencies for Spark InProcessLauncher -->

        <dependency>
            <groupId>com.typesafe.play</groupId>
            <artifactId>play-json_${scala.compat.version}</artifactId>
            <version>${play-json.version}</version>
        </dependency>
        <dependency>
            <groupId>com.typesafe.play</groupId>
            <artifactId>play-ws-standalone-json_${scala.compat.version}</artifactId>
            <version>${play-ws-standalone.version}</version>
        </dependency>
        <dependency>
            <groupId>com.typesafe.play</groupId>
            <artifactId>play-ahc-ws-standalone_${scala.compat.version}</artifactId>
            <version>${play-ahc-ws-standalone.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-security</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>${quartz.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <version>${spring.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-ldap</artifactId>
            <version>${spring.security.ldap.version}</version>
        </dependency>
        <dependency>
            <groupId>it.burning</groupId>
            <artifactId>cron-expression-descriptor</artifactId>
            <version>${cron-expression-descriptor.version}</version>
        </dependency>
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-maven-plugin</artifactId>
            <version>${liquibase-maven-plugin.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
            <version>${commons-validator.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>${hibernate.validator.version}</version>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-emr</artifactId>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-sts</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.security.kerberos</groupId>
            <artifactId>spring-security-kerberos-client</artifactId>
            <version>${spring.kerberos.version}</version>
        </dependency>

        <!-- For Liquibase yaml -->
        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>${snakeyaml.version}</version>
        </dependency>


        <!-- WebJars -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons.lang3.version}</version>
        </dependency>
        <dependency>
            <groupId>net.bull.javamelody</groupId>
            <artifactId>javamelody-spring-boot-starter</artifactId>
            <version>${javamelody.spring.boot.starter.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-aop</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!-- Override spring version in javamelody-spring-boot-starter -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
            <version>${spring.version}</version>
        </dependency>
        <!--TESTS-->
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.compat.version}</artifactId>
            <version>${scalatest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>${h2database.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>postgresql</artifactId>
            <version>${testcontainers.postgresql.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.github.embeddedkafka</groupId>
            <artifactId>embedded-kafka_${scala.compat.version}</artifactId>
            <version>${embedded.kafka.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>za.co.absa.commons</groupId>
            <artifactId>commons_${scala.compat.version}</artifactId>
            <version>${absa.commons.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.hadoop</groupId>
            <artifactId>hadoop-aws</artifactId>
            <version>${hadoop-aws.version}</version>
        </dependency>
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk-bundle</artifactId>
            <version>${aws-java-sdk-bundle.version}</version>
        </dependency>
    </dependencies>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>${spring.version}</version>
                <configuration>
                    <mainClass>za.co.absa.hyperdrive.trigger.Application</mainClass>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>${scala-maven-plugin.version}</version>
                <executions>
                    <execution>
                        <id>scala-compile</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>scala-test-compile</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.scalatest</groupId>
                <artifactId>scalatest-maven-plugin</artifactId>
                <version>${scalatest-maven-plugin.version}</version>
                <configuration>
                    <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
                    <junitxml>.</junitxml>
                    <filereports>TestSuite.txt</filereports>
                </configuration>
                <executions>
                    <execution>
                        <id>unit-tests</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <suffixes>(?&lt;!PostgresTest)</suffixes>
                            <suites>${scalatest.suites}</suites>
                            <tagsToExclude>${scalatest.tagsToExclude}</tagsToExclude>
                        </configuration>
                    </execution>
                    <execution>
                        <id>postgres-tests</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <suffixes>(?&lt;=PostgresTest)</suffixes>
                            <skipTests>${skip.postgres.tests}</skipTests>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>${maven.war.plugin.version}</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                    <webResources>
                        <resource>
                            <directory>target/classes/ui</directory>
                            <targetPath>/</targetPath>
                            <filtering>false</filtering>
                        </resource>
                    </webResources>
                    <packagingExcludes>META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA</packagingExcludes>
                    <archive>
                        <manifestEntries>
                            <App-Version>${project.version}</App-Version>
                        </manifestEntries>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.liquibase</groupId>
                <artifactId>liquibase-maven-plugin</artifactId>
                <version>${liquibase-maven-plugin.version}</version>
                <configuration>
                    <propertyFile>etc/liquibase/liquibase-maven-plugin.properties</propertyFile>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.postgresql</groupId>
                        <artifactId>postgresql</artifactId>
                        <version>${postgresql}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>${frontend.maven.plugin.version}</version>
                <configuration>
                    <workingDirectory>ui</workingDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>install node and npm</id>
                        <goals>
                            <goal>install-node-and-npm</goal>
                        </goals>
                        <configuration>
                            <nodeVersion>v${node.version}</nodeVersion>
                            <npmVersion>${npm.version}</npmVersion>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm install</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>npm build</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run build</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm lint</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <configuration>
                            <arguments>run lint:ci</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>npm tests</id>
                        <goals>
                            <goal>npm</goal>
                        </goals>
                        <phase>test</phase>
                        <configuration>
                            <skipTests>${skipNpmTests}</skipTests>
                            <arguments>run test:ci</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.spotify</groupId>
                <artifactId>dockerfile-maven-plugin</artifactId>
                <configuration>
                    <skip>false</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <configuration>
                    <autoReleaseAfterClose>false</autoReleaseAfterClose>
                    <stagingProgressTimeoutMinutes>15</stagingProgressTimeoutMinutes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
                <version>${git.commit.id.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <id>get-the-git-infos</id>
                        <goals>
                            <goal>revision</goal>
                        </goals>
                        <phase>initialize</phase>
                    </execution>
                </executions>
                <configuration>
                    <generateGitPropertiesFile>true</generateGitPropertiesFile>
                    <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
                    <includeOnlyProperties>
                        <includeOnlyProperty>^git.build.(time|version)$</includeOnlyProperty>
                        <includeOnlyProperty>^git.commit.id.(abbrev|full)$</includeOnlyProperty>
                    </includeOnlyProperties>
                    <commitIdGenerationMode>full</commitIdGenerationMode>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <configuration>
                    <addDefaultLicenseMatchers>false</addDefaultLicenseMatchers>
                    <consoleOutput>true</consoleOutput>
                    <excludes combine.children="append">
                        <exclude>**/node/**</exclude>
                        <exclude>**/node_modules/**</exclude>
                        <exclude>**/.editorconfig</exclude>
                        <exclude>.dockerignore</exclude>
                        <exclude>**/.gitkeep</exclude>
                        <exclude>src/main/resources/banner.txt</exclude>
                        <exclude>**/CODEOWNERS</exclude>
                        <exclude>**/ISSUE_TEMPLATE/*.md</exclude>
                        <exclude>ui/.angular/**</exclude>
                        <exclude>ui/**.json</exclude>
                        <exclude>ui/e2e/tsconfig.json</exclude>
                        <exclude>ui/src/proxy.conf.json</exclude>
                        <exclude>logs/**</exclude>
                    </excludes>
                    <licenses>
                        <license implementation="org.apache.rat.analysis.license.FullTextMatchingLicense">
                            <licenseFamilyCategory>AL2</licenseFamilyCategory>
                            <licenseFamilyName>Apache License 2</licenseFamilyName>
                            <fullText>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.
                            </fullText>
                        </license>
                    </licenses>
                    <licenseFamilies>
                        <licenseFamily implementation="org.apache.rat.license.SimpleLicenseFamily">
                            <familyName>Apache License 2</familyName>
                        </licenseFamily>
                    </licenseFamilies>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.antipathy</groupId>
                <artifactId>mvn-scalafmt_${scala.compat.version}</artifactId>
                <version>1.1.1640084764.9f463a9</version>
                <configuration>
                    <configLocation>${project.basedir}/.scalafmt.conf</configLocation>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>hortonworks</id>
            <activation>
                <property>
                    <name>!exclude-hortonworks</name>
                </property>
            </activation>
            <repositories>
                <repository>
                    <id>hortonworks</id>
                    <url>https://repo.hortonworks.com/content/repositories/releases/</url>
                </repository>
            </repositories>
            <properties>
                <hadoop.version>2.7.3.2.6.1.0-129</hadoop.version>
                <hadoop.scope>compile</hadoop.scope>
            </properties>
        </profile>
        <profile>
            <id>testdata</id>
            <activation>
                <property>
                    <name>testdata</name>
                </property>
            </activation>
            <properties>
                <scalatest.suites>za.co.absa.hyperdrive.trigger.testdata.TestDataGeneratorLocal</scalatest.suites>
                <scalatest.tagsToExclude />
                <skip.npm>true</skip.npm>
                <skip.installnodenpm>true</skip.installnodenpm>
            </properties>
        </profile>
        <profile>
            <id>all-tests</id>
            <activation>
                <property>
                    <name>all-tests</name>
                </property>
            </activation>
            <properties>
                <skip.postgres.tests>false</skip.postgres.tests>
            </properties>
        </profile>
        <profile>
            <id>manual-release</id>
            <activation>
                <property>
                    <name>manual-release</name>
                </property>
            </activation>
            <properties>
                <scm.connection>scm:git:git://github.com/AbsaOSS/hyperdrive-trigger.git</scm.connection>
                <scm.developerConnection>scm:git:ssh://github.com/AbsaOSS/hyperdrive-trigger.git</scm.developerConnection>
                <scm.url>https://github.com/AbsaOSS/hyperdrive-trigger/tree/master</scm.url>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>${maven.release.plugin.version}</version>
                        <configuration>
                            <username>git</username> <!-- Make sure git-push is not tried with local user -->
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
