Contact Us 1-800-596-4880

MUnit Migration Guide

To upgrade to MUnit 1.3, you mostly need to modify the pom.xml file.

New Maven groupId for MUnit Artifacts

The groupId org.mule.munit has changed to com.mulesoft.munit, so you must replace all occurrences of the groupId with the new name.

MUnit Maven Plugin

Change the groupId for the MUnit Maven Plugin as shown below.

Original:

<plugin>
  <groupId>org.mule.munit.tools</groupId>
  <artifactId>munit-maven-plugin</artifactId>
  <version>${munit.version}</version>
  ...
</plugin>

New value:

<plugin>
  <groupId>com.mulesoft.munit.tools</groupId>
  <artifactId>munit-maven-plugin</artifactId>
  <version>${munit.version}</version>
  ...
</plugin>

MUnit Dependencies

Past releases of MUnit required several artifacts in the pom.xml file. For the new version, the number of these artifacts is considerably less.

Artifacts in old MUnit versions:

<dependency>
    <groupId>org.mule.munit</groupId>
    <artifactId>munit-assert</artifactId>
    <version>${munit.version}</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.mule.munit</groupId>
    <artifactId>munit-mock</artifactId>
    <version>${munit.version}</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.mule.munit</groupId>
    <artifactId>munit-common</artifactId>
    <version>${munit.version}</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.mule.munit</groupId>
    <artifactId>munit-runner</artifactId>
    <version>${munit.version}</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.mule.modules</groupId>
    <artifactId>mule-interceptor-module</artifactId>
    <version>${munit.version}</version>
    <scope>test</scope>
</dependency>

MUnit 1.3.5 requires only the following artifacts:

<dependency>
   <groupId>com.mulesoft.munit</groupId>
    <artifactId>mule-munit-support</artifactId>
    <version>${mule.munit.support.version}</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>com.mulesoft.munit</groupId>
    <artifactId>munit-runner</artifactId>
    <version>${munit.version}</version>
    <scope>test</scope>
</dependency>

Note that the groupIds have changed from org.mule.munit to com.mulesoft.munit, and that the mule-munit-support version artifact is new.

Properties

MUnit 1.3.5 requires the following properties in the pom.xml file:

<munit.version>1.3.5</munit.version>
<mule.munit.support.version>3.7.5</mule.munit.support.version>

Note that ${mule.munit.support.version} should match the Mule Runtime major and minor version numbers:

  • 3.7.8 for Mule 3.7.x

  • 3.8.5 for Mule 3.8.x

  • 3.9.0 for Mule 3.9.x

Mule ESB 3.7.x

For Mule ESB 3.7.x, add the following two Maven artifacts to the pom.xml file:

<dependency>
    <groupId>org.mule.modules</groupId>
    <artifactId>mule-module-extensions-support</artifactId>
    <version>${mule.version}</version>
</dependency>
<dependency>
    <groupId>org.mule.modules</groupId>
    <artifactId>mule-module-extensions-spring-support</artifactId>
    <version>${mule.version}</version>
</dependency>