<?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">
    <parent>
        <groupId>dev.sheldan.abstracto</groupId>
        <artifactId>abstracto-application</artifactId>
        <version>1.3.1-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>coverage</artifactId>

    <properties>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <sonar.dynamicAnalysis>reuseReports</sonar.dynamicAnalysis>
        <sonar.language>java</sonar.language>
        <code.coverage.project.folder>${basedir}/../</code.coverage.project.folder>
        <code.coverage.overall.data.folder>${basedir}/../target/jacoco.exec</code.coverage.overall.data.folder>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>dev.sheldan.abstracto</groupId>
                <artifactId>bundle</artifactId>
                <version>${project.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>dev.sheldan.abstracto.core</groupId>
            <artifactId>core-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.core</groupId>
            <artifactId>core-int</artifactId>
            <version>${project.version}</version>
        </dependency>
        <!-- modules containing commands -->

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>moderation-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>moderation-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>modmail-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>modmail-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>utility-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>utility-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>experience-tracking-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>experience-tracking-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.scheduling</groupId>
            <artifactId>scheduling-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.scheduling</groupId>
            <artifactId>scheduling-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>assignable-roles-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>assignable-roles-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>statistic-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>statistic-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.core</groupId>
            <artifactId>metrics-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.core</groupId>
            <artifactId>metrics-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>entertainment-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>entertainment-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>link-embed-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>link-embed-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>remind-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>remind-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>repost-detection-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>repost-detection-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>starboard-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>starboard-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>suggestion-impl</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>suggestion-int</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>dev.sheldan.abstracto.modules</groupId>
            <artifactId>webservices-impl</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <!-- Jacoco prepare-agent builds some command-line params without -->
                    <!-- which jacoco will not instrument. Hence it is important to add -->
                    <!-- those command-line params here (${argLine} holds those params) -->
                    <argLine>${argLine} -Xms256m -Xmx2048m</argLine>
                    <forkCount>1</forkCount>
                    <runOrder>random</runOrder>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.5</version>
                <configuration>
                    <excludes>
                        <exclude>**/*Test.java</exclude>
                    </excludes>
                    <destFile>${code.coverage.overall.data.folder}</destFile>
                    <append>true</append>
                </configuration>
                <executions>
                    <execution>
                        <id>report-aggregate</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>report-aggregate</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>merge-results</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>merge</goal>
                        </goals>
                        <configuration>
                            <fileSets>
                                <fileSet>
                                    <directory>${code.coverage.project.folder}</directory>
                                    <includes>
                                        <include>**/target/jacoco.exec</include>
                                    </includes>
                                </fileSet>
                            </fileSets>
                            <destFile>${code.coverage.overall.data.folder}/jacoco.exec</destFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>



</project>