<?xml version="1.0" encoding="UTF-8"?>
<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>

    <name>Parent project for Reliability Platform</name>
    <description>The Reliability Platform lets you practice chaos engineering on the application level by injecting delays and faults to simulate turbulent conditions. By specifying routes, the Chaos Middleware enables you to minimize the blast radius and keep the focus on the interesting parts of your application.</description>
    <url>https://proofdock.io</url>
    
    <groupId>io.proofdock</groupId>
    <artifactId>reliability-platform-modules</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>
    
    <properties>
        <!-- Dependencies-->
        <apache.httpclient.version>4.5.12</apache.httpclient.version>
        <jackson.version>2.11.2</jackson.version>
        <jacoco.version>0.8.5</jacoco.version>
        <junit.version>5.6.2</junit.version>
        <logback.version>1.2.3</logback.version>
        <wiremock.version>2.27.2</wiremock.version>
        <mvn.checkstyle.version>3.1.1</mvn.checkstyle.version>
        <mvn.compiler.version>3.8.1</mvn.compiler.version>
        <mvn.surefire.version>2.22.2</mvn.surefire.version>
        <mvn.javadoc.version>3.2.0</mvn.javadoc.version>
        <mvn.source.version>3.2.1</mvn.source.version>
        <mvn.gpg.version>1.6</mvn.gpg.version>
        <!-- Settings-->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    
    <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>
    <scm>
        <developerConnection>scm:git:ssh://github.com/proofdock/chaos-middleware-java.git</developerConnection>
        <url>http://github.com/proofdock/chaos-middleware-java</url>
    </scm>
    <developers>
        <developer>
            <name>Bugra Derre</name>
            <email>bugra.derre@proofdock.io</email>
            <organization>Proofdock</organization>
            <organizationUrl>http://proofdock.io</organizationUrl>
        </developer>
        <developer>
            <name>Marcin Kaszubski</name>
            <email>marcin.kaszubski@proofdock.io</email>
            <organization>Proofdock</organization>
            <organizationUrl>http://proofdock.io</organizationUrl>
        </developer>
    </developers>
    <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>




    <modules>
        <module>core</module>
        <module>contrib-spring</module>
    </modules>


    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Signing-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${mvn.gpg.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${mvn.compiler.version}</version>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <configuration>
                    <excludes>
                        <exclude>META-INF/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${mvn.surefire.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${mvn.checkstyle.version}</version>
                <configuration>
                    <configLocation>config/codestyle/checkstyle-java-google-style.xml</configLocation>
                </configuration>
                <executions>
                    <execution>
                        <id>check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.8.1</version>
            </plugin>
               <!-- Sources & docs-->
               <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${mvn.source.version}</version>
                <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>${mvn.javadoc.version}</version>
                <configuration>
                    <source>8</source>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>fluent-hc</artifactId>
            <version>${apache.httpclient.version}</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
        </dependency>

        <!-- Testing -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
            <version>${wiremock.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>