title: MUnit tests cause maven build to fail
body: <p>I have a Maven-ized Anypoint Studio project that fails a Maven build upon executing <code>mvn clean package</code>; however, running <code>mvn clean package -DskipMunitTests</code>results in a successful build.</p>
  
  <p>Stack Trace:</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 9.443 s
  [INFO] Finished at: 2016-11-09T09:03:52-08:00
  [INFO] Final Memory: 35M/494M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal com.mulesoft.munit.tools:munit-maven-plugin:1.2.1:test (test) on project template: Execution test of goal com.mulesoft.munit.tools:munit-maven-plugin:1.2.1:test failed: org.mule.api.config.ConfigurationException: Configuration problem: Failed to import bean definitions from URL location [classpath:template.xml]
  [ERROR] Offending resource: URL [file:/C:/Projects/ERP/Integrations/Workflows/Workflows-Dev/template/target/test-classes/template-test-suite.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [template.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [com.mulesoft.weave.mule.config.WeaveNamespaceHandler] for namespace [http://www.mulesoft.org/schema/mule/ee/dw]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: scala/Option (org.mule.api.lifecycle.InitialisationException): scala.Option
  [ERROR] -&gt; [Help 1]
  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.mulesoft.munit.tools:munit-maven-plugin:1.2.1:test (test) on project template: Execution test of goal com.mulesoft.munit.tools:munit-maven-plugin:1.2.1:test failed: org.mule.api.config.ConfigurationException: Configuration problem: Failed to import bean definitions from URL location [classpath:template.xml]
  Offending resource: URL [file:/C:/Projects/ERP/Integrations/Workflows/Workflows-Dev/template/target/test-classes/template-test-suite.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [template.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [com.mulesoft.weave.mule.config.WeaveNamespaceHandler] for namespace [http://www.mulesoft.org/schema/mule/ee/dw]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: scala/Option (org.mule.api.lifecycle.InitialisationException)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
      at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
      at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
      at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
  Caused by: org.apache.maven.plugin.PluginExecutionException: Execution test of goal com.mulesoft.munit.tools:munit-maven-plugin:1.2.1:test failed: org.mule.api.config.ConfigurationException: Configuration problem: Failed to import bean definitions from URL location [classpath:template.xml]
  Offending resource: URL [file:/C:/Projects/ERP/Integrations/Workflows/Workflows-Dev/template/target/test-classes/template-test-suite.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [template.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [com.mulesoft.weave.mule.config.WeaveNamespaceHandler] for namespace [http://www.mulesoft.org/schema/mule/ee/dw]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: scala/Option (org.mule.api.lifecycle.InitialisationException)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:145)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
      ... 20 more
  Caused by: java.lang.RuntimeException: org.mule.api.config.ConfigurationException: Configuration problem: Failed to import bean definitions from URL location [classpath:template.xml]
  Offending resource: URL [file:/C:/Projects/ERP/Integrations/Workflows/Workflows-Dev/template/target/test-classes/template-test-suite.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [template.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [com.mulesoft.weave.mule.config.WeaveNamespaceHandler] for namespace [http://www.mulesoft.org/schema/mule/ee/dw]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: scala/Option (org.mule.api.lifecycle.InitialisationException)
      at org.mule.munit.runner.mule.MunitSuiteRunner.&lt;init&gt;(MunitSuiteRunner.java:44)
      at org.mule.MUnitMojo.buildRunnerFor(MUnitMojo.java:323)
      at org.mule.MUnitMojo.doExecute(MUnitMojo.java:180)
      at org.mule.MUnitMojo.execute(MUnitMojo.java:125)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
      ... 21 more
  Caused by: org.mule.api.config.ConfigurationException: Configuration problem: Failed to import bean definitions from URL location [classpath:template.xml]
  Offending resource: URL [file:/C:/Projects/ERP/Integrations/Workflows/Workflows-Dev/template/target/test-classes/template-test-suite.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [template.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [com.mulesoft.weave.mule.config.WeaveNamespaceHandler] for namespace [http://www.mulesoft.org/schema/mule/ee/dw]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: scala/Option (org.mule.api.lifecycle.InitialisationException)
      at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:49)
      at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:69)
      at org.mule.context.DefaultMuleContextFactory$1.configure(DefaultMuleContextFactory.java:89)
      at org.mule.context.DefaultMuleContextFactory.doCreateMuleContext(DefaultMuleContextFactory.java:222)
      at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:81)
      at org.mule.munit.runner.MunitMuleContextFactory.createMuleContext(MunitMuleContextFactory.java:86)
      at org.mule.munit.runner.MuleContextManager.createMule(MuleContextManager.java:114)
      at org.mule.munit.runner.MuleContextManager.startMule(MuleContextManager.java:67)
      at org.mule.munit.runner.mule.MunitSuiteRunner.&lt;init&gt;(MunitSuiteRunner.java:38)
      ... 25 more
  Caused by: org.mule.api.lifecycle.InitialisationException: Configuration problem: Failed to import bean definitions from URL location [classpath:template.xml]
  Offending resource: URL [file:/C:/Projects/ERP/Integrations/Workflows/Workflows-Dev/template/target/test-classes/template-test-suite.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [template.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [com.mulesoft.weave.mule.config.WeaveNamespaceHandler] for namespace [http://www.mulesoft.org/schema/mule/ee/dw]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: scala/Option
      at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:112)
      at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:177)
      at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:100)
      at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:43)
      ... 33 more
  Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:template.xml]
  Offending resource: URL [file:/C:/Projects/ERP/Integrations/Workflows/Workflows-Dev/template/target/test-classes/template-test-suite.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [template.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [com.mulesoft.weave.mule.config.WeaveNamespaceHandler] for namespace [http://www.mulesoft.org/schema/mule/ee/dw]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: scala/Option
      at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70)
      at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
      at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:235)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:186)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:171)
      at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:56)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:100)
      at org.mule.config.spring.MuleHierarchicalBeanDefinitionParserDelegate.handleSpringElements(MuleHierarchicalBeanDefinitionParserDelegate.java:180)
      at org.mule.munit.runner.spring.config.reader.MunitBeanDefinitionParserDelegate.parseCustomElement(MunitBeanDefinitionParserDelegate.java:41)
      at org.mule.munit.runner.spring.config.reader.MunitBeanDefinitionParserDelegate.parseCustomElement(MunitBeanDefinitionParserDelegate.java:82)
      at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1417)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:180)
      at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:56)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:100)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:510)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
      at org.mule.munit.runner.spring.config.MunitApplicationContext.communicateMuleContextToParsers(MunitApplicationContext.java:125)
      at org.mule.munit.runner.spring.config.MunitApplicationContext.loadBeanDefinitions(MunitApplicationContext.java:98)
      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
      at org.mule.config.spring.SpringRegistry.doInitialise(SpringRegistry.java:108)
      at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:104)
      ... 36 more
  Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [template.xml]; nested exception is org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [com.mulesoft.weave.mule.config.WeaveNamespaceHandler] for namespace [http://www.mulesoft.org/schema/mule/ee/dw]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: scala/Option
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:414)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:229)
      ... 61 more
  Caused by: org.springframework.beans.FatalBeanException: Invalid NamespaceHandler class [com.mulesoft.weave.mule.config.WeaveNamespaceHandler] for namespace [http://www.mulesoft.org/schema/mule/ee/dw]: problem with handler class file or dependent class; nested exception is java.lang.NoClassDefFoundError: scala/Option
      at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:140)
      at org.mule.munit.runner.spring.config.reader.MunitBeanDefinitionParserDelegate.parseCustomElement(MunitBeanDefinitionParserDelegate.java:45)
      at org.mule.munit.runner.spring.config.reader.MunitBeanDefinitionParserDelegate.parseCustomElement(MunitBeanDefinitionParserDelegate.java:82)
      at org.mule.munit.runner.spring.config.reader.MunitBeanDefinitionParserDelegate.parseCustomElement(MunitBeanDefinitionParserDelegate.java:82)
      at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1417)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:180)
      at org.mule.config.spring.MuleBeanDefinitionDocumentReader.parseBeanDefinitions(MuleBeanDefinitionDocumentReader.java:56)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:144)
      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:100)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:510)
      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
      ... 66 more
  Caused by: java.lang.NoClassDefFoundError: scala/Option
      at com.mulesoft.weave.mule.config.WeaveNamespaceHandler.init(WeaveNamespaceHandler.scala:22)
      at org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver.resolve(DefaultNamespaceHandlerResolver.java:131)
      ... 76 more
  Caused by: java.lang.ClassNotFoundException: scala.Option
      at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
      at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
      ... 78 more
  [ERROR] 
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
  </code></pre>
  
  <p>POM file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;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/maven-v4_0_0.xsd"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.savers&lt;/groupId&gt;
      &lt;artifactId&gt;template&lt;/artifactId&gt;
      &lt;version&gt;1.0.0.16&lt;/version&gt;
      &lt;packaging&gt;mule&lt;/packaging&gt;
      &lt;name&gt;Mule Template Application&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;mule.version&gt;3.8.1&lt;/mule.version&gt;
          &lt;mule.tools.version&gt;1.2&lt;/mule.tools.version&gt;
          &lt;munit.version&gt;1.2.1&lt;/munit.version&gt;
          &lt;mule.munit.support.version&gt;3.8.1&lt;/mule.munit.support.version&gt;
          &lt;maven.install.plugin.version&gt;2.3.1&lt;/maven.install.plugin.version&gt;
          &lt;mule-maven-plugin.version&gt;2.1.2&lt;/mule-maven-plugin.version&gt;
          &lt;mule-mmc-rest-plugin.version&gt;1.2.0&lt;/mule-mmc-rest-plugin.version&gt;
          &lt;cglib.version&gt;3.2.2&lt;/cglib.version&gt;
          &lt;sqljdbc4.version&gt;4.0&lt;/sqljdbc4.version&gt;
      &lt;/properties&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;com.savers.parent&lt;/groupId&gt;
          &lt;artifactId&gt;savers-parent&lt;/artifactId&gt;
          &lt;version&gt;1.0.0.4&lt;/version&gt;
      &lt;/parent&gt;
  
      &lt;build&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-install-plugin&lt;/artifactId&gt;
                      &lt;version&gt;${maven.install.plugin.version}&lt;/version&gt;
                  &lt;/plugin&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.mule.tools.maven&lt;/groupId&gt;
                  &lt;artifactId&gt;mule-app-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${mule.tools.version}&lt;/version&gt;
                  &lt;extensions&gt;true&lt;/extensions&gt;
                  &lt;configuration&gt;
                      &lt;copyToAppsDirectory&gt;false&lt;/copyToAppsDirectory&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.mule.tools&lt;/groupId&gt;
                  &lt;artifactId&gt;mule-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${mule-maven-plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;muleDistribution&gt;
                          &lt;groupId&gt;com.mulesoft.muleesb.distributions&lt;/groupId&gt;
                          &lt;artifactId&gt;mule-ee-distribution-standalone&lt;/artifactId&gt;
                          &lt;version&gt;${mule.version}&lt;/version&gt;
                          &lt;type&gt;tar.gz&lt;/type&gt;
                      &lt;/muleDistribution&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.mulesoft.munit.tools&lt;/groupId&gt;
                  &lt;artifactId&gt;munit-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${munit.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;dynamicPorts&gt;
                          &lt;dynamicPort&gt;a.dynamic.port&lt;/dynamicPort&gt;
                      &lt;/dynamicPorts&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;test&lt;/id&gt;
                          &lt;phase&gt;test&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;test&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;com.github.nicholasastuart&lt;/groupId&gt;
                  &lt;artifactId&gt;mule-mmc-rest-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${mule-mmc-rest-plugin.version}&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;mule-deploy&lt;/id&gt;
                          &lt;phase&gt;install&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;deploy&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;name&gt;${project.artifactId}&lt;/name&gt;
                              &lt;username&gt;${mmc.user}&lt;/username&gt;
                              &lt;password&gt;${mmc.password}&lt;/password&gt;
                              &lt;version&gt;${project.version}&lt;/version&gt;
                              &lt;serverGroup&gt;${mmc.serverGroup}&lt;/serverGroup&gt;
                              &lt;muleApiUrl&gt;${mmc.url}&lt;/muleApiUrl&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
  
          &lt;testResources&gt;
              &lt;testResource&gt;
                  &lt;directory&gt;src/test/munit&lt;/directory&gt;
              &lt;/testResource&gt;
              &lt;testResource&gt;
                  &lt;directory&gt;src/test/resources&lt;/directory&gt;
              &lt;/testResource&gt;
          &lt;/testResources&gt;
      &lt;/build&gt;
  
      &lt;!-- Mule Dependencies --&gt;
      &lt;dependencies&gt;
          &lt;!-- Xml configuration --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.mulesoft.muleesb&lt;/groupId&gt;
              &lt;artifactId&gt;mule-core-ee&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- Xml configuration --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.mulesoft.muleesb.modules&lt;/groupId&gt;
              &lt;artifactId&gt;mule-module-spring-config-ee&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- Mule Transports --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mule.transports&lt;/groupId&gt;
              &lt;artifactId&gt;mule-transport-file&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mule.transports&lt;/groupId&gt;
              &lt;artifactId&gt;mule-transport-http&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.mulesoft.muleesb.transports&lt;/groupId&gt;
              &lt;artifactId&gt;mule-transport-jdbc-ee&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.mulesoft.muleesb.transports&lt;/groupId&gt;
              &lt;artifactId&gt;mule-transport-jms-ee&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mule.transports&lt;/groupId&gt;
              &lt;artifactId&gt;mule-transport-vm&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- Mule Modules --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mule.modules&lt;/groupId&gt;
              &lt;artifactId&gt;mule-module-scripting&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mule.modules&lt;/groupId&gt;
              &lt;artifactId&gt;mule-module-xml&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- for testing --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mule.tests&lt;/groupId&gt;
              &lt;artifactId&gt;mule-tests-functional&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mule.modules&lt;/groupId&gt;
              &lt;artifactId&gt;mule-module-apikit&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/sqljdbc4 --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
              &lt;artifactId&gt;sqljdbc4&lt;/artifactId&gt;
              &lt;version&gt;${sqljdbc4.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mule.modules&lt;/groupId&gt;
              &lt;artifactId&gt;mule-module-http&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;cglib&lt;/groupId&gt;
              &lt;artifactId&gt;cglib&lt;/artifactId&gt;
              &lt;version&gt;${cglib.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.mulesoft.weave&lt;/groupId&gt;
              &lt;artifactId&gt;mule-plugin-weave&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mule.modules&lt;/groupId&gt;
              &lt;artifactId&gt;mule-module-json&lt;/artifactId&gt;
              &lt;version&gt;${mule.version}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.mulesoft.munit&lt;/groupId&gt;
              &lt;artifactId&gt;mule-munit-support&lt;/artifactId&gt;
              &lt;version&gt;${mule.munit.support.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.mulesoft.munit&lt;/groupId&gt;
              &lt;artifactId&gt;munit-runner&lt;/artifactId&gt;
              &lt;version&gt;${munit.version}&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;releases&lt;/id&gt;
              &lt;name&gt;Savers&lt;/name&gt;
              &lt;url&gt;some url here&lt;/url&gt;
              &lt;layout&gt;default&lt;/layout&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;snapshots&lt;/id&gt;
              &lt;name&gt;Snapshots&lt;/name&gt;
              &lt;url&gt;some url here&lt;/url&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;/snapshots&gt;
              &lt;layout&gt;default&lt;/layout&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;Central&lt;/id&gt;
              &lt;name&gt;Central&lt;/name&gt;
              &lt;url&gt;http://repo1.maven.org/maven2/&lt;/url&gt;
              &lt;layout&gt;default&lt;/layout&gt;
          &lt;/repository&gt;
          &lt;repository&gt;
              &lt;id&gt;mulesoft-releases&lt;/id&gt;
              &lt;name&gt;MuleSoft Releases Repository&lt;/name&gt;
              &lt;url&gt;http://repository.mulesoft.org/releases/&lt;/url&gt;
              &lt;layout&gt;default&lt;/layout&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;mulesoft-release&lt;/id&gt;
              &lt;name&gt;mulesoft release repository&lt;/name&gt;
              &lt;layout&gt;default&lt;/layout&gt;
              &lt;url&gt;http://repository.mulesoft.org/releases/&lt;/url&gt;
              &lt;snapshots&gt;
                  &lt;enabled&gt;false&lt;/enabled&gt;
              &lt;/snapshots&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;    
  &lt;/project&gt;
  </code></pre>
  
  <p>Imports:</p>
  
  <pre><code>&lt;munit:config name="munit" doc:name="MUnit configuration" mock-connectors="false" mock-inbounds="false"/&gt;
  &lt;spring:beans&gt;
      &lt;spring:import resource="classpath:template.xml"/&gt;
      &lt;spring:import resource="classpath:global.xml"/&gt;
  &lt;/spring:beans&gt;
  </code></pre>
  
  <p>I do have <code>.properties</code> files in the src/main/app and src/main/resources folders that I have tried importing as well but have had no success.</p>
  
  <p>I should mention that the Munit tests do run successfully within Anypoint Studio.</p>
  
  <p>I have been wrestling with this for a couple days and just cannot seem to spot the issue.  </p>
  
  <p>This question <a href="https://stackoverflow.com/questions/37773833/mavenized-mule-project-but-munit-test-run-is-failing">Mavenized Mule project but Munit test run is failing</a> is super close to mine, but still not quite what I need.  </p>
  
  <p>Any help or insight would be greatly appreciated.  </p>
  
  <p>Thanks.</p>