<?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>com.mulesoft</groupId>
        <artifactId>munit</artifactId>
        <version>2.0.0</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mulesoft.munit</groupId>
    <artifactId>munit-remote</artifactId>
    <packaging>jar</packaging>

    <name>MUnit :: Remote Module</name>
    <description>Entry point to run MUnit test from different sources</description>

    <properties>
        <maven.assembly.plugin.version>3.0.0</maven.assembly.plugin.version>
        <slf4j.log4j12.version>1.7.24</slf4j.log4j12.version>

        <licensePath>../LICENSE_HEADER.txt</licensePath>
        <formatterConfigPath>../formatter.xml</formatterConfigPath>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-api</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.log4j12.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-embedded-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.munit.plugins</groupId>
            <artifactId>munit-coverage-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.tools.maven</groupId>
            <artifactId>mule-packager</artifactId>
        </dependency>

        <!-- Test Dependencies -->
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.munit</groupId>
            <artifactId>munit-common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-deployment-model</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${maven.assembly.plugin.version}</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <configuration>
                    <haltOnFailure>true</haltOnFailure>
                    <rules>
                        <rule>
                            <element>BUNDLE</element>
                            <!--<limits>-->
                            <!--<limit>-->
                            <!--<counter>BRANCH</counter>-->
                            <!--<value>COVEREDRATIO</value>-->
                            <!--&lt;!&ndash;<minimum>0.43</minimum>&ndash;&gt;-->
                            <!--<minimum>0.42</minimum>-->
                            <!--</limit>-->
                            <!--<limit>-->
                            <!--<counter>INSTRUCTION</counter>-->
                            <!--<value>COVEREDRATIO</value>-->
                            <!--<minimum>0.43</minimum>-->
                            <!--</limit>-->
                            <!--<limit>-->
                            <!--<counter>LINE</counter>-->
                            <!--<value>COVEREDRATIO</value>-->
                            <!--&lt;!&ndash;<minimum>0.55</minimum>&ndash;&gt;-->
                            <!--<minimum>0.53</minimum>-->
                            <!--</limit>-->
                            <!--</limits>-->
                            <!--Previous coverage limits-->
                            <!--<lineRate>71</lineRate>-->
                            <!--<branchRate>60</branchRate>-->
                            <!--<packageLineRate>78</packageLineRate>-->
                            <!--<packageBranchRate>70</packageBranchRate>-->
                            <!--<totalLineRate>86</totalLineRate>-->
                            <!--<totalBranchRate>75</totalBranchRate>-->
                        </rule>
                    </rules>
                </configuration>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <id>mule-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>http://repository.mulesoft.org/releases/</url>
            <layout>default</layout>
        </repository>
        <repository>
            <id>mule-snapshots</id>
            <name>MuleSoft Snapshots Repository</name>
            <url>http://repository.mulesoft.org/snapshots/</url>
            <layout>default</layout>
        </repository>
    </repositories>
</project>
