使用Munit测试Maven构建失败

时间:2018-02-15 18:42:30

标签: maven anypoint-studio

在anypoint studio中构建了一个mavenized mule应用程序作为域项目。增加了munit测试。我可以运行munit测试套件,所有测试都成功完成。我可以在跳过munit测试时使用-DskipMunitTests来构建和部署应用程序。但是,现在我希望构建包含munit测试,但是当我删除-DskipMunitTests时,我收到以下错误......

[INFO] Building Mule inventoryService Application 1.0.0-SNAPSHOT

[INFO] --- mule-app-maven-plugin:1.2:attach-test-resources (default-attach-test-resources) @ inventoryService ---
[INFO] attaching test resource C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\src\main\app
[INFO] --- build-helper-maven-plugin:1.7:add-resource (add-resource) @ inventoryService ---
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ inventoryService ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 9 resources
[INFO] Copying 6 resources
[INFO] Copying 2 resources
[INFO] skip non existing resourceDirectory C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\mappings
[INFO] --- mule-app-maven-plugin:1.2:filter-resources (default-filter-resources) @ inventoryService ---
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ inventoryService ---
[INFO] Nothing to compile - all classes are up to date
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ inventoryService ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] Copying 9 resources
[INFO] Copying 6 resources
[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ inventoryService ---
[INFO] Nothing to compile - all classes are up to date
[INFO] --- maven-surefire-plugin:2.20:test (default-test) @ inventoryService ---
[INFO] --- munit-maven-plugin:1.3.4:test (test) @ inventoryService ---
[INFO] Acquiring dynamic ports...
[INFO] Dynamic port definition [DONE]
[INFO] Mule working directory set to: C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\target\.mule
[org.mule.munit.remote.RemoteRunner]Run Started
Coverage port: 51497 resources: BCStd-httpListenerConfig.xml,global.xml,interfaces.xml,inventoryService.xml 
INFO  2018-02-15 11:40:41,084 [Thread-1] org.mule.munit.plugins.coverage.server.MunitCoverageServer: Waiting for coverage connection 
INFO  2018-02-15 11:40:41,099 [main] org.mule.munit.runner.MuleContextManager: Loading mule-app.properties ...
INFO  2018-02-15 11:40:41,144 [main] org.mule.munit.runner.domain.MunitDomainContextBuilder: Loading mule-deploy.properties ...
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/user/.m2/repository/org/apache/logging/log4j/log4j-slf4j-impl/2.5/log4j-slf4j-impl-2.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/user/.m2/repository/org/slf4j/slf4j-log4j12/1.7.5/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
INFO  2018-02-15 11:40:41,529 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker
INFO  2018-02-15 11:40:41,674 [main] org.mule.config.spring.MuleDomainContext: Refreshing org.mule.config.spring.MuleDomainContext@335b5620: startup date [Thu Feb 15 11:40:41 CST 2018]; root of context hierarchy
INFO  2018-02-15 11:40:42,969 [main] org.mule.config.spring.processors.ContextExclusiveInjectorProcessor: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
INFO  2018-02-15 11:40:43,734 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx2.log
INFO  2018-02-15 11:40:43,749 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx2.log
INFO  2018-02-15 11:40:44,254 [main] org.mule.config.spring.SpringXmlDomainConfigurationBuilder: Configured Mule using "org.mule.config.spring.SpringXmlDomainConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='jar:file:/C:/Users/user/.m2/repository/com/mercury/mulesoft/muledomain/1.0.0-SNAPSHOT/muledomain-1.0.0-SNAPSHOT.zip!/mule-domain-config.xml'}]"
INFO  2018-02-15 11:40:44,254 [main] org.mule.util.queue.QueueXaResourceManager: Starting ResourceManager
INFO  2018-02-15 11:40:44,254 [main] org.mule.util.queue.QueueXaResourceManager: Started ResourceManager
INFO  2018-02-15 11:40:44,294 [main] org.mule.module.http.internal.listener.DefaultHttpListenerConfig: Listening for requests on http://0.0.0.0:8081
INFO  2018-02-15 11:40:44,299 [main] org.mule.DefaultMuleContext: 

 Mule Runtime and Integration Platform 
 Version: 3.8.4 Build: 0fc91f08 
 MuleSoft, Inc. 
 For more information go to http://www.mulesoft.org 
 Server started: 2/15/18 11:40 AM 
 Server ID: id 
 JDK: 1.8.0_111 (mixed mode) 
 OS encoding: Cp1252, Mule encoding: UTF-8 
 OS: Windows 7 - Service Pack 1 (6.1, amd64) 
 Host: blah (ip) 
 Agents Running: None 

INFO  2018-02-15 11:40:44,349 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker
INFO  2018-02-15 11:40:44,369 [main] org.mule.module.extension.internal.manager.DefaultExtensionManager: Starting discovery of extensions
INFO  2018-02-15 11:40:44,504 [main] org.mule.module.extension.internal.manager.DefaultExtensionManager: Discovered 1 extensions
INFO  2018-02-15 11:40:44,504 [main] org.mule.module.extension.internal.manager.DefaultExtensionManager: Registering extension validation (version 3.8)
INFO  2018-02-15 11:40:44,514 [main] org.mule.munit.runner.spring.config.MunitApplicationContext: Refreshing org.mule.munit.runner.spring.config.MunitApplicationContext@397ef2: startup date [Thu Feb 15 11:40:44 CST 2018]; parent: org.mule.config.spring.MuleDomainContext@335b5620
WARN  2018-02-15 11:40:45,324 [main] org.mule.transport.http.builder.HttpHeaderDefinitionParser: Schema warning: Use of element <header> is deprecated.  HTTP transport is deprecated and will be removed in Mule 4.0. Use HTTP module instead..
WARN  2018-02-15 11:40:45,529 [main] org.mule.munit.runner.spring.config.MunitApplicationContext: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Secure_Property_Placeholder': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found
INFO  2018-02-15 11:40:45,549 [main] org.mule.lifecycle.AbstractLifecycleManager: Disposing RegistryBroker
java.lang.RuntimeException: org.mule.api.config.ConfigurationException: Error creating bean with name 'Secure_Property_Placeholder': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found (org.mule.api.lifecycle.InitialisationException)
    at org.mule.munit.runner.mule.SuiteRunner.<init>(SuiteRunner.java:59)
    at org.mule.munit.runner.mule.SuiteRunner.<init>(SuiteRunner.java:45)
    at org.mule.munit.remote.RemoteRunner.runTestSuite(RemoteRunner.java:75)
    at org.mule.munit.remote.RemoteRunner.run(RemoteRunner.java:55)
    at org.mule.munit.remote.RemoteRunner.main(RemoteRunner.java:39)
Caused by: org.mule.api.config.ConfigurationException: Error creating bean with name 'Secure_Property_Placeholder': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found (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)
    .....
    ... 4 more
Caused by: org.mule.api.lifecycle.InitialisationException: Error creating bean with name 'Secure_Property_Placeholder': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found
    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)
    ... 12 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'Secure_Property_Placeholder': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1512)
    .....
    ... 15 more
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (2) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'key' threw exception; nested exception is java.lang.RuntimeException: Property MULEENC could not be found
PropertyAccessException 2: org.springframework.beans.MethodInvocationException: Property 'location' threw exception; nested exception is java.lang.RuntimeException: Property mule.env could not be found
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1508)
    ... 27 more
INFO  2018-02-15 11:40:45,899 [main] org.mule.munit.runner.MuleContextManager: Loading mule-app.properties ...
INFO  2018-02-15 11:40:45,899 [main] org.mule.munit.runner.domain.MunitDomainContextBuilder: Loading mule-deploy.properties ...
INFO  2018-02-15 11:40:45,909 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker
INFO  2018-02-15 11:40:45,924 [main] org.mule.config.spring.MuleDomainContext: Refreshing org.mule.config.spring.MuleDomainContext@3b95a6db: startup date [Thu Feb 15 11:40:45 CST 2018]; root of context hierarchy
INFO  2018-02-15 11:40:46,094 [main] org.mule.config.spring.processors.ContextExclusiveInjectorProcessor: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
INFO  2018-02-15 11:40:46,194 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx2.log
INFO  2018-02-15 11:40:46,199 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx2.log
INFO  2018-02-15 11:40:46,209 [main] org.mule.config.spring.SpringXmlDomainConfigurationBuilder: Configured Mule using "org.mule.config.spring.SpringXmlDomainConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='jar:file:/C:/Users/user/.m2/repository/com/mercury/mulesoft/muledomain/1.0.0-SNAPSHOT/muledomain-1.0.0-SNAPSHOT.zip!/mule-domain-config.xml'}]"
INFO  2018-02-15 11:40:46,209 [main] org.mule.util.queue.QueueXaResourceManager: Starting ResourceManager
INFO  2018-02-15 11:40:46,209 [main] org.mule.util.queue.QueueXaResourceManager: Started ResourceManager
[org.mule.munit.remote.CoverageManager]Calculating application coverage for resources: BCStd-httpListenerConfig.xml,global.xml,interfaces.xml,inventoryService.xml
java.lang.RuntimeException: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig@73613ae5
    at org.mule.munit.runner.mule.SuiteRunner.<init>(SuiteRunner.java:59)
    at org.mule.munit.runner.mule.SuiteRunner.<init>(SuiteRunner.java:45)
    at org.mule.munit.remote.RemoteRunner.runTestSuite(RemoteRunner.java:75)
    at org.mule.munit.remote.RemoteRunner.run(RemoteRunner.java:55)
    at org.mule.munit.remote.RemoteRunner.main(RemoteRunner.java:39)
Caused by: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig@73613ae5
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:249)
    at org.mule.lifecycle.RegistryLifecycleCallback.doApplyLifecycle(RegistryLifecycleCallback.java:99)
    at org.mule.lifecycle.RegistryLifecycleCallback.onTransition(RegistryLifecycleCallback.java:71)
    .....
    ... 4 more
Caused by: java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    .....
    ... 20 more
INFO  2018-02-15 11:40:46,234 [main] org.mule.munit.runner.MuleContextManager: Loading mule-app.properties ...
INFO  2018-02-15 11:40:46,239 [main] org.mule.munit.runner.domain.MunitDomainContextBuilder: Loading mule-deploy.properties ...
INFO  2018-02-15 11:40:46,244 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising RegistryBroker
INFO  2018-02-15 11:40:46,254 [main] org.mule.config.spring.MuleDomainContext: Refreshing org.mule.config.spring.MuleDomainContext@29fe4840: startup date [Thu Feb 15 11:40:46 CST 2018]; root of context hierarchy
INFO  2018-02-15 11:40:46,439 [main] org.mule.config.spring.processors.ContextExclusiveInjectorProcessor: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
INFO  2018-02-15 11:40:46,529 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-tx-log\tx2.log
INFO  2018-02-15 11:40:46,529 [main] org.mule.util.journal.TransactionJournal: Using files for tx logs C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx1.log and C:\Users\user\AnypointStudio\BPMtoMulesoft\inventoryService\.\.mule\queue-xa-tx-log\tx2.log
INFO  2018-02-15 11:40:46,559 [main] org.mule.config.spring.SpringXmlDomainConfigurationBuilder: Configured Mule using "org.mule.config.spring.SpringXmlDomainConfigurationBuilder" with configuration resource(s): "[ConfigResource{resourceName='jar:file:/C:/Users/user/.m2/repository/com/mercury/mulesoft/muledomain/1.0.0-SNAPSHOT/muledomain-1.0.0-SNAPSHOT.zip!/mule-domain-config.xml'}]"
INFO  2018-02-15 11:40:46,559 [main] org.mule.util.queue.QueueXaResourceManager: Starting ResourceManager
INFO  2018-02-15 11:40:46,559 [main] org.mule.util.queue.QueueXaResourceManager: Started ResourceManager
[org.mule.munit.remote.CoverageManager]Coverage report calculation failed  - 
java.lang.RuntimeException: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig@68b7d0ef
    at org.mule.munit.runner.simple.MunitSimpleRunner.run(MunitSimpleRunner.java:54)
    at org.mule.munit.remote.path.ApplicationPathBuilder.buildApplicationPaths(ApplicationPathBuilder.java:80)
    at org.mule.munit.remote.path.ApplicationPathBuilder.getFlowPaths(ApplicationPathBuilder.java:41)
    .....
Caused by: org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: org.mule.module.http.internal.listener.DefaultHttpListenerConfig@68b7d0ef
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:249)
    at org.mule.lifecycle.RegistryLifecycleCallback.doApplyLifecycle(RegistryLifecycleCallback.java:99)
    at org.mule.lifecycle.RegistryLifecycleCallback.onTransition(RegistryLifecycleCallback.java:71)
    .....
    ... 6 more
Caused by: java.net.BindException: Address already in use: bind
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:433)
    at sun.nio.ch.Net.bind(Net.java:425)
    .....
    ... 22 more
[org.mule.munit.remote.RemoteRunner]Done
[INFO] Printing Coverage Report...
[INFO] 
[INFO] MUnit Coverage Summary
[INFO] 
[INFO]  * Resources: 0 - Flows: 0 - Message Processors: 0
[INFO]  * Application Coverage: N/A
[INFO]
[INFO] MUnit Run Summary                                                                   
[INFO]
[INFO]  >> inventoryService-apikit-test.xml test result: Tests: 0, Errors: 0, Failures:0, Skipped: 0 <<< ERROR
[INFO]  >> inventoryService-apikit-exception-test.xml test result: Tests: 0, Errors: 0, Failures:0, Skipped: 0 <<< ERROR
[INFO] 
[INFO]  > Tests:    0
[INFO]  > Errors:   0
[INFO]  > Failures: 0
[INFO]  > Skipped:  0
[INFO] 
[INFO] BUILD FAILURE
[INFO] Total time: 11.421 s
[INFO] Finished at: 2018-02-15T11:40:47-06:00
[INFO] Final Memory: 27M/266M
[INFO] 
[ERROR] Failed to execute goal com.mulesoft.munit.tools:munit-maven-plugin:1.3.4:test (test) on project inventoryService: Build Fail: MUnit Tests Failed -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[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/MojoExecutionException
[INFO] Scanning for projects...
[INFO] 
[INFO] Building Domain muledomain Project 1.0.0-SNAPSHOT
[INFO] 
[INFO] --- mule-domain-maven-plugin:1.2:attach-test-resources (default-attach-test-resources) @ muledomain ---
[INFO] attaching test resource C:\Users\user\AnypointStudio\BPMtoMulesoft\muledomain\src\main\app
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ muledomain ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] --- mule-domain-maven-plugin:1.2:filter-resources (default-filter-resources) @ muledomain ---
[INFO] --- maven-compiler-plugin:3.6.1:compile (default-compile) @ muledomain 
[INFO] No sources to compile
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ muledomain ---
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory C:\Users\user\AnypointStudio\BPMtoMulesoft\muledomain\src\test\resources
[INFO] skip non existing resourceDirectory C:\Users\user\AnypointStudio\BPMtoMulesoft\muledomain\src\main\app
[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ muledomain ---
[INFO] No sources to compile
[INFO] --- maven-surefire-plugin:2.20:test (default-test) @ muledomain ---
[INFO] No tests to run.
[INFO] 
[INFO] BUILD SUCCESS
[INFO] 
[INFO] Total time: 1.770 s
[INFO] Finished at: 2018-02-15T11:40:50-06:00
[INFO] Final Memory: 12M/145M
[INFO]

...我花了很多时间研究这些错误,但我发现其他人的大部分内容都缺少依赖关系,我似乎已经在我的pom文件中了解了这些依赖关系。 可能是什么问题?任何建议表示赞赏。

2 个答案:

答案 0 :(得分:0)

根据您提供的日志,我观察到两个主要错误:

#1

nested exception is java.lang.RuntimeException: Property mule.env could not be found

解决方案:交叉检查您是否根据您的环境(dev / test / prod)配置了mule.env=dev

#2

Caused by: java.net.BindException: Address already in use: bind

解决方案:如果您使用的是具有相同端口号的多个HTTP连接器,或者您正在使用系统中某些其他s / w占用的端口,那么您将获得此{ {1}}。尝试使用其他端口号,例如BindException

答案 1 :(得分:0)

<munit:config name="munit" doc:name="MUnit configuration" mock-connectors="false" mock-inbounds="false"  />

请用上述代码更新您的Munit XML,它应该可以正常工作!