<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2019 Oneo GmbH (ConfigSeeder, https://configseeder.com/) and others.
  ~
  ~ 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.configseeder.common</groupId>
  <artifactId>configseeder-common-parent</artifactId>
  <version>2.2.0</version>
  <packaging>pom</packaging>

  <description>ConfigSeeder Utils</description>
  <name>ConfigSeeder .:. Common/Utils</name>

  <scm>
    <connection>scm:git:https://gitlab.com/configseeder/java-common.git</connection>
    <developerConnection>scm:git:git@gitlab.com:configseeder/java-common.git</developerConnection>
    <tag>2.2.0</tag>
  </scm>

  <distributionManagement>
    <repository>
      <id>configseeder-release-repository</id>
      <url>https://mymavenrepo.com/repo/lmbW0Cij5VcDzpUvNfla/</url>
      <uniqueVersion>false</uniqueVersion>
    </repository>
    <snapshotRepository>
      <id>configseeder-snapshot-repository</id>
      <url>https://mymavenrepo.com/repo/oxFw2ShvPjrG4MgjggK3/</url>
      <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
  </distributionManagement>

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

    <dependency.lombok.version>1.18.2</dependency.lombok.version>
    <dependency.snakeyaml.version>1.23</dependency.snakeyaml.version>
    <dependency.jsr305.version>3.0.1</dependency.jsr305.version>

    <plugin.jacoco-maven-plugin.version>0.8.2</plugin.jacoco-maven-plugin.version>
    <plugin.maven-surefire-plugin.version>2.22.1</plugin.maven-surefire-plugin.version>
    <plugin.maven-deploy-plugin.version>2.8.2</plugin.maven-deploy-plugin.version>
    <plugin.maven-source-plugin.version>3.0.1</plugin.maven-source-plugin.version>

    <dependency.junit-jupiter-engine.version>5.4.0</dependency.junit-jupiter-engine.version>
    <dependency.assertj-core.version>3.11.1</dependency.assertj-core.version>
  </properties>

  <modules>
    <module>utils</module>
    <module>shared</module>
  </modules>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>${plugin.maven-source-plugin.version}</version>
        <configuration>
          <skipSource>true</skipSource>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${plugin.maven-surefire-plugin.version}</version>
        <configuration>
          <useSystemClassLoader>false</useSystemClassLoader>
          <argLine>-server -ea -Djdk.net.URLClassPath.disableClassPathURLCheck=true ${surefire.argline}</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>${plugin.jacoco-maven-plugin.version}</version>
        <executions>
          <execution>
            <id>default-prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
            <configuration>
              <propertyName>surefire.argline</propertyName>
            </configuration>
          </execution>
          <execution>
            <id>default-prepare-agent-integration</id>
            <goals>
              <goal>prepare-agent-integration</goal>
            </goals>
            <configuration>
              <propertyName>failsafe.argLine</propertyName>
            </configuration>
          </execution>
          <execution>
            <id>jacoco-report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
          <execution>
            <id>report-aggregate</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>report-aggregate</goal>
            </goals>
            <configuration>
              <title>JaCoCo</title>
              <footer>Code Coverage Report for JaCoCo ${project.version}</footer>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>${plugin.maven-deploy-plugin.version}</version>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <version>${dependency.lombok.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>${dependency.jsr305.version}</version>
    </dependency>

    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${dependency.junit-jupiter-engine.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${dependency.assertj-core.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.configseeder.common</groupId>
        <artifactId>configseeder-common</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>com.configseeder.common</groupId>
        <artifactId>configseeder-utils</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>org.yaml</groupId>
        <artifactId>snakeyaml</artifactId>
        <version>${dependency.snakeyaml.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

</project>
