<?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>

    <groupId>com.mulesoft</groupId>
    <artifactId>munit</artifactId>
    <version>2.2.5</version>
    <packaging>pom</packaging>

    <name>MUnit :: Parent pom</name>

    <properties>
        <javaVersion>1.8</javaVersion>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <mule.version>4.1.1</mule.version>
        <mule.api.version>1.1.4</mule.api.version>
        <mule.embedded.api.version>1.2.0</mule.embedded.api.version>
        <mule.packager.version>3.4.0</mule.packager.version>
        <http.client.version>4.5.3</http.client.version>

        <!-- Properties -->
        <skipVerifications>false</skipVerifications>
        <skipJaCoCoCoverage>${skipVerifications}</skipJaCoCoCoverage>
        <skipLicenseCheck>${skipVerifications}</skipLicenseCheck>
        <skipIntegrationTests>false</skipIntegrationTests>

        <!-- Plugin Versions -->
        <findbugs.maven.plugin.version>3.0.4</findbugs.maven.plugin.version>
        <maven.site.plugin.version>3.5.1</maven.site.plugin.version>
        <checkstyle.plugin.version>2.17</checkstyle.plugin.version>
        <checkstyle.version>8.0</checkstyle.version>
        <maven.javadoc.plugin.version>2.10.4</maven.javadoc.plugin.version>
        <maven.source.plugin.version>2.2.1</maven.source.plugin.version>
        <javaFormatter.plugin.version>1.9.2</javaFormatter.plugin.version>
        <maven.license.plugin.version>1.9.0</maven.license.plugin.version>
        <maven.enforcer.plugin.version>3.0.0-M1</maven.enforcer.plugin.version>
        <maven.install.plugin.version>2.5.2</maven.install.plugin.version>
        <maven.deploy.plugin.version>2.8.2</maven.deploy.plugin.version>
        <build.helper.maven.plugin.version>3.1.0</build.helper.maven.plugin.version>

        <!-- Dependencies -->
        <gson.version>2.6.2</gson.version>
        <guava.version>19.0</guava.version>
        <junit.version>4.12</junit.version>
        <awaitility.version>4.0.2</awaitility.version>
        <json.version>20160810</json.version>
        <hamcrestVersion>1.3</hamcrestVersion>
        <xerces.version>2.8.0</xerces.version>
        <mockito.version>1.10.19</mockito.version>
        <commons.io.version>2.5</commons.io.version>
        <commons.lang3.version>3.6</commons.lang3.version>
        <commons.cli.version>1.2</commons.cli.version>
        <jakarta.activation.version>1.2.1</jakarta.activation.version>

        <jacoco.maven.plugin.version>0.8.2</jacoco.maven.plugin.version>
        <jacoco.report.location>${session.executionRootDirectory}/target/jacoco.exec</jacoco.report.location>
        <coverageLineLimit>0.99</coverageLineLimit>
        <coverageBranchLimit>0.99</coverageBranchLimit>

        <formatterGoal>validate</formatterGoal>
        <licensePath>LICENSE_HEADER.txt</licensePath>
        <formatterConfigPath>formatter.xml</formatterConfigPath>
        <checkStyleConfigPath>munit_check.xml</checkStyleConfigPath>
        <findbugsExcludePath>findbugs-exclude.xml</findbugsExcludePath>

        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
    </properties>

    <modules>
        <module>munit-core</module>
        <module>munit-maven-tools</module>
        <module>munit-remote</module>
        <module>munit-plugins</module>
        <module>munit-junit</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.mycila.maven-license-plugin</groupId>
                    <artifactId>maven-license-plugin</artifactId>
                    <version>${maven.license.plugin.version}</version>
                    <configuration>
                        <header>${licensePath}</header>
                        <strictCheck>true</strictCheck>
                        <skip>${skipLicenseCheck}</skip>
                        <excludes>
                            <exclude>target/**</exclude>
                            <exclude>**/.gitignore</exclude>
                            <exclude>**/*.txt</exclude>
                            <exclude>**/*.groovy</exclude>
                            <exclude>**/*.sh</exclude>
                            <exclude>**/*.bat</exclude>
                            <exclude>**/*.ftl</exclude>
                            <exclude>**/*.xml</exclude>
                            <exclude>**/*.properties</exclude>
                            <exclude>**/*.sample</exclude>
                            <exclude>**/*.md</exclude>
                            <exclude>**/*.xsl</exclude>
                            <exclude>**/*.html</exclude>
                            <exclude>**/*.css</exclude>
                        </excludes>
                        <includes>
                            <include>**/*.java</include>
                        </includes>
                        <mapping>
                            <java>SLASHSTAR_STYLE</java>
                        </mapping>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${maven.javadoc.plugin.version}</version>
                    <configuration>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${checkstyle.plugin.version}</version>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${checkstyle.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <skip>${skipVerifications}</skip>
                        <configLocation>${checkStyleConfigPath}</configLocation>
                        <failOnViolation>true</failOnViolation>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                                <goal>checkstyle-aggregate</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.marvinformatics.formatter</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <version>${javaFormatter.plugin.version}</version>
                    <configuration>
                        <compilerCompliance>${javaVersion}</compilerCompliance>
                        <compilerSource>${javaVersion}</compilerSource>
                        <compilerTargetPlatform>${javaVersion}</compilerTargetPlatform>
                        <configFile>${basedir}/${formatterConfigPath}</configFile>
                        <configJsFile>${basedir}/${formatterConfigPath}</configJsFile>
                        <aggregator>false</aggregator>
                        <executionRoot>true</executionRoot>
                        <skipFormatting>${skipVerifications}</skipFormatting>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>${formatterGoal}</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven.enforcer.plugin.version}</version>
                    <executions>
                        <execution>
                            <id>enforce-plugin-versions</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <banDuplicatePomDependencyVersions />
                                    <requirePluginVersions>
                                        <message>Best Practice is to always define plugin versions!</message>
                                        <banLatest>false</banLatest>
                                        <banRelease>false</banRelease>
                                        <banSnapshots>false</banSnapshots>
                                        <banTimestamps>false</banTimestamps>
                                        <phases>clean,deploy,site</phases>
                                        <unCheckedPluginList>
                                            org.apache.maven.plugins:maven-clean-plugin,
                                            org.apache.maven.plugins:maven-install-plugin,
                                            org.apache.maven.plugins:maven-deploy-plugin,
                                            org.apache.maven.plugins:maven-compiler-plugin,
                                            org.apache.maven.plugins:maven-surefire-plugin,
                                            org.apache.maven.plugins:maven-jar-plugin,
                                            org.apache.maven.plugins:maven-resources-plugin
                                        </unCheckedPluginList>
                                    </requirePluginVersions>

                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>${maven.install.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven.deploy.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>com.mycila.maven-license-plugin</groupId>
                <artifactId>maven-license-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven.site.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugs.maven.plugin.version}</version>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                    <threshold>High</threshold>
                    <skip>${skipVerifications}</skip>
                    <failOnError>true</failOnError>
                    <excludeFilterFile>${findbugsExcludePath}</excludeFilterFile>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>findbugs</goal>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.marvinformatics.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>${javaFormatter.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <id>default-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>default-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <haltOnFailure>true</haltOnFailure>
                    <skip>${skipJaCoCoCoverage}</skip>
                    <append>true</append>
                    <destFile>${jacoco.report.location}</destFile>
                    <dataFile>${jacoco.report.location}</dataFile>
                    <rules>
                        <rule>
                            <element>BUNDLE</element>
                            <limits>
                                <limit>
                                    <counter>LINE</counter>
                                    <value>COVEREDRATIO</value>
                                    <minimum>${coverageLineLimit}</minimum>
                                </limit>
                                <limit>
                                    <counter>BRANCH</counter>
                                    <value>COVEREDRATIO</value>
                                    <minimum>${coverageBranchLimit}</minimum>
                                </limit>
                            </limits>
                        </rule>
                    </rules>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-core</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-api</artifactId>
                <version>${mule.api.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-embedded-api</artifactId>
                <version>${mule.embedded.api.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-module-deployment-model</artifactId>
                <version>${mule.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-module-spring-config</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-module-launcher</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.mulesoft.mule.modules</groupId>
                <artifactId>mule-module-plugin-ee</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-module-extensions-support</artifactId>
                <version>${mule.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mule.tools.maven</groupId>
                <artifactId>mule-packager</artifactId>
                <version>${mule.packager.version}</version>
            </dependency>

            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-all</artifactId>
                <version>${hamcrestVersion}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>     <!-- TODO try to remove this dependency -->
                <groupId>org.mockito</groupId>
                <artifactId>mockito-all</artifactId>
                <version>${mockito.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.awaitility</groupId>
                <artifactId>awaitility</artifactId>
                <version>${awaitility.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.json</groupId>
                <artifactId>json</artifactId>
                <version>${json.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-lang3</artifactId>
                <version>${commons.lang3.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-io</groupId>
                <artifactId>commons-io</artifactId>
                <version>${commons.io.version}</version>
            </dependency>
            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>${commons.cli.version}</version>
            </dependency>
            <dependency>
                <groupId>xerces</groupId>
                <artifactId>xercesImpl</artifactId>
                <version>${xerces.version}</version>
            </dependency>
            <dependency>
                <groupId>com.sun.activation</groupId>
                <artifactId>jakarta.activation</artifactId>
                <version>${jakarta.activation.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugs.maven.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.maven.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${checkstyle.plugin.version}</version>
            </plugin>
        </plugins>
    </reporting>

    <distributionManagement>
        <repository>
            <id>mule-releases</id>
            <name>MuleSoft Releases Repository</name>
            <url>https://repository-master.mulesoft.org/releases/</url>
        </repository>
        <snapshotRepository>
            <id>mule-snapshots</id>
            <name>MuleSoft Snapshots Repository</name>
            <url>https://repository-master.mulesoft.org/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <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>https://repository.mulesoft.org/snapshots/</url>
            <layout>default</layout>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>mulesoft-plugin-releases</id>
            <name>MuleSoft Release Repository</name>
            <url>http://repository.mulesoft.org/releases/</url>
            <releases>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>mulesoft-plugin-snapshots</id>
            <name>MuleSoft Snapshot Repository</name>
            <url>http://repository.mulesoft.org/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>munit-core</module>
                <module>munit-maven-tools</module>
                <module>munit-remote</module>
                <module>munit-plugins</module>
                <module>munit-junit</module>
                <module>munit-tests</module>
            </modules>
        </profile>
    </profiles>

    <scm>
        <connection>scm:git:git://github.com:mulesoft/munit-runtime.git
        </connection>
        <developerConnection>
            scm:git:git@github.com:mulesoft/munit-runtime.git
        </developerConnection>
        <url>http://github.com/mulesoft/munit-runtime</url>
        <tag>munit-2.2.5</tag>
    </scm>
</project>
