title: Citrus Framework - Cannot successfully build samples
body: <p>I have been investigating the Citrus Framework and pulled down the samples project folder. The run instructions indicates what to do to build the code, start the Jetty server and run the various tests that are included. I have tried this and the build fails only after the second module. This was done on a Windows 10 box.</p>
  
  <p>The simple maven command to do the build, start the Jetty server and run the integration tests is:</p>
  
  <pre><code>$ mvn clean install -Dembedded=true
  </code></pre>
  
  <p>Below is an excerpt of the console log.</p>
  
  <pre><code>[ERROR] Tests run: 4, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 20.582 s &lt;&lt;&lt; FAILURE! - in TestSuite
  [ERROR] routeMessagesContentBased(com.consol.citrus.samples.bakery.RouteMessagesHttpIT)  Time elapsed: 4.259 s  &lt;&lt;&lt; FAILURE!
  com.consol.citrus.exceptions.TestCaseFailedException: I/O error on POST request for "http://localhost:18001/bakery/services/order": Connect to localhost:18001 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to localhost:18001 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
          at com.consol.citrus.samples.bakery.RouteMessagesHttpIT.routeMessagesContentBased(RouteMessagesHttpIT.java:55)
  Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://localhost:18001/bakery/services/order": Connect to localhost:18001 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to localhost:18001 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
          at com.consol.citrus.samples.bakery.RouteMessagesHttpIT.routeMessagesContentBased(RouteMessagesHttpIT.java:55)
  Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:18001 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
  
          at com.consol.citrus.samples.bakery.RouteMessagesHttpIT.routeMessagesContentBased(RouteMessagesHttpIT.java:55)
  Caused by: java.net.ConnectException: Connection refused: connect
          at com.consol.citrus.samples.bakery.RouteMessagesHttpIT.routeMessagesContentBased(RouteMessagesHttpIT.java:55)
  
  [ERROR] routeUnknownOrderType(com.consol.citrus.samples.bakery.RouteMessagesHttpIT)  Time elapsed: 2.023 s  &lt;&lt;&lt; FAILURE!
  com.consol.citrus.exceptions.TestCaseFailedException: I/O error on POST request for "http://localhost:18001/bakery/services/order": Connect to localhost:18001 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to localhost:18001 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
          at com.consol.citrus.samples.bakery.RouteMessagesHttpIT.routeUnknownOrderType(RouteMessagesHttpIT.java:109)
  Caused by: org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://localhost:18001/bakery/services/order": Connect to localhost:18001 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect; nested exception is org.apache.http.conn.HttpHostConnectException: Connect to localhost:18001 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
          at com.consol.citrus.samples.bakery.RouteMessagesHttpIT.routeUnknownOrderType(RouteMessagesHttpIT.java:109)
  Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:18001 [localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1] failed: Connection refused: connect
  
          at com.consol.citrus.samples.bakery.RouteMessagesHttpIT.routeUnknownOrderType(RouteMessagesHttpIT.java:109)
  Caused by: java.net.ConnectException: Connection refused: connect
          at com.consol.citrus.samples.bakery.RouteMessagesHttpIT.routeUnknownOrderType(RouteMessagesHttpIT.java:109)
  
  [ERROR] routeMessagesContentBased(com.consol.citrus.samples.bakery.RouteMessagesJmsIT)  Time elapsed: 5.274 s  &lt;&lt;&lt; FAILURE!
  com.consol.citrus.exceptions.TestCaseFailedException: Action timed out while receiving JMS message on 'factory.chocolate.inbound'
          at com.consol.citrus.samples.bakery.RouteMessagesJmsIT.routeMessagesContentBased(RouteMessagesJmsIT.java:55)
  Caused by: com.consol.citrus.exceptions.ActionTimeoutException: Action timed out while receiving JMS message on 'factory.chocolate.inbound'
          at com.consol.citrus.samples.bakery.RouteMessagesJmsIT.routeMessagesContentBased(RouteMessagesJmsIT.java:55)
  
  [ERROR] routeUnknownOrderType(com.consol.citrus.samples.bakery.RouteMessagesJmsIT)  Time elapsed: 5.026 s  &lt;&lt;&lt; FAILURE!
  com.consol.citrus.exceptions.TestCaseFailedException: Action timed out while receiving JMS message on 'factory.unknown.inbound'
          at com.consol.citrus.samples.bakery.RouteMessagesJmsIT.routeUnknownOrderType(RouteMessagesJmsIT.java:82)
  Caused by: com.consol.citrus.exceptions.ActionTimeoutException: Action timed out while receiving JMS message on 'factory.unknown.inbound'
          at com.consol.citrus.samples.bakery.RouteMessagesJmsIT.routeUnknownOrderType(RouteMessagesJmsIT.java:82)
  
  08:39:04,888 INFO  icApplicationContext| Closing org.springframework.context.support.GenericApplicationContext@31190526: startup date [Mon Feb 03 08:38:46 EST 2020]; root of context hierarchy
  08:39:04,888 DEBUG tListableBeanFactory| Returning cached instance of singleton bean 'lifecycleProcessor'
  08:39:04,889 DEBUG tListableBeanFactory| Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5939a379: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.event.internalEventListenerProcessor,org.springframework.context.event.internalEventListenerFactory,citrusSpringConfig,com.consol.citrus.functions.FunctionConfig,functionRegistry,environmentPropertyFunction,citrusFunctionLibrary,com.consol.citrus.validation.matcher.ValidationMatcherConfig,matchesPath,hamcrestValidationMatcher,validationMatcherRegistry,xmlValidationMatcher,citrusValidationMatcherLibrary,com.consol.citrus.validation.MessageValidatorConfig,defaultXmlMessageValidator,defaultMessageHeaderValidator,defaultXpathMessageValidator,defaultJsonMessageValidator,defaultJsonPathMessageValidator,defaultPlaintextMessageValidator,defaultBinaryMessageValidator,defaultBinaryBase64MessageValidator,defaultGzipBinaryBase64MessageValidator,defaultXhtmlMessageValidator,defaultXhtmlXpathMessageValidator,defaultGroovyXmlMessageValidator,defaultGroovyJsonMessageValidator,defaultGroovyTextMessageValidator,citrusMessageValidatorRegistry,testContextFactory,endpointFactory,referenceResolver,globalMessageConstructionInterceptors,loggingReporter,htmlReporter,junitReporter,testListeners,testActionListeners,testSuiteListeners,messageListeners,failureStackTestListener,com.consol.citrus.samples.bakery.CitrusEndpointConfig,globalVariables,messageTracingTestListener,connectionFactory,bakeryClient,bakeryOrderEndpoint,workerCaramelEndpoint,workerBlueberryEndpoint,workerChocolateEndpoint]; root of factory hierarchy
  08:39:04,889 DEBUG tListableBeanFactory| Retrieved dependent beans for bean 'workerChocolateEndpoint': [com.consol.citrus.samples.bakery.RouteMessagesHttpIT, com.consol.citrus.samples.bakery.RouteMessagesJmsIT]
  08:39:04,890 DEBUG isposableBeanAdapter| Invoking destroy() on bean with name 'workerChocolateEndpoint'
  08:39:04,890 DEBUG isposableBeanAdapter| Invoking destroy() on bean with name 'workerBlueberryEndpoint'
  08:39:04,890 DEBUG isposableBeanAdapter| Invoking destroy() on bean with name 'workerCaramelEndpoint'
  08:39:04,890 DEBUG isposableBeanAdapter| Invoking destroy() on bean with name 'bakeryOrderEndpoint'
  [INFO]
  [INFO] Results:
  [INFO]
  [ERROR] Failures:
  [ERROR]   RouteMessagesHttpIT&gt;TestNGCitrusTest.run:56-&gt;TestNGCitrusTest.run:110-&gt;TestNGCitrusTest.invokeTestMethod:131 ╗ TestCaseFailed
  [ERROR]   RouteMessagesHttpIT&gt;TestNGCitrusTest.run:56-&gt;TestNGCitrusTest.run:110-&gt;TestNGCitrusTest.invokeTestMethod:131 ╗ TestCaseFailed
  [ERROR]   RouteMessagesJmsIT&gt;TestNGCitrusTest.run:56-&gt;TestNGCitrusTest.run:110-&gt;TestNGCitrusTest.invokeTestMethod:131 ╗ TestCaseFailed
  [ERROR]   RouteMessagesJmsIT&gt;TestNGCitrusTest.run:56-&gt;TestNGCitrusTest.run:110-&gt;TestNGCitrusTest.invokeTestMethod:131 ╗ TestCaseFailed
  [INFO]
  [ERROR] Tests run: 4, Failures: 4, Errors: 0, Skipped: 0
  [INFO]
  [INFO]
  [INFO] --- maven-failsafe-plugin:2.20.1:verify (integration-tests) @ citrus-bakery-web ---
  [INFO] ------------------------------------------------------------------------
  [INFO] Reactor Summary:
  [INFO]
  [INFO] Citrus Samples:: Bakery ............................ SUCCESS [  0.330 s]
  [INFO] Citrus Samples:: Bakery Web ........................ FAILURE [ 29.752 s]
  [INFO] Citrus Samples:: Bakery Worker ..................... SKIPPED
  [INFO] Citrus Samples:: Bakery Report ..................... SKIPPED
  [INFO] Citrus Samples:: Bakery Integration ................ SKIPPED
  [INFO] Citrus Samples:: Java EE ........................... SKIPPED
  [INFO] Citrus Samples:: Flightbooking ..................... SKIPPED
  [INFO] Citrus Samples:: Greeting: Java .................... SKIPPED
  [INFO] Citrus Samples:: Bookstore ......................... SKIPPED
  [INFO] Citrus Samples:: Incident .......................... SKIPPED
  [INFO] Citrus Samples:: Demos ............................. SKIPPED
  [INFO] Citrus Samples:: Todo App .......................... SKIPPED
  [INFO] Citrus Samples:: Apache Camel Context .............. SKIPPED
  [INFO] Citrus Samples:: Behaviors ......................... SKIPPED
  [INFO] Citrus Samples:: Dictionaries ...................... SKIPPED
  [INFO] Citrus Samples:: Message Store ..................... SKIPPED
  [INFO] Citrus Samples:: Docker ............................ SKIPPED
  [INFO] Citrus Samples:: Kubernetes ........................ SKIPPED
  [INFO] Citrus Samples:: Cucumber BDD ...................... SKIPPED
  [INFO] Citrus Samples:: Cucumber BDD Spring ............... SKIPPED
  [INFO] Citrus Samples:: Cucumber BDD Spring 2 ............. SKIPPED
  [INFO] Citrus Samples:: Cucumber Samples .................. SKIPPED
  [INFO] Citrus Samples:: Annotation Config ................. SKIPPED
  [INFO] Citrus Samples:: Java Config ....................... SKIPPED
  [INFO] Citrus Samples:: Mail .............................. SKIPPED
  [INFO] Citrus Samples:: Selenium .......................... SKIPPED
  [INFO] Citrus Samples:: FTP ............................... SKIPPED
  [INFO] Citrus Samples:: SFTP .............................. SKIPPED
  [INFO] Citrus Samples:: SCP ............................... SKIPPED
  [INFO] Citrus Samples:: FTP Samples ....................... SKIPPED
  [INFO] Citrus Samples:: TestNG ............................ SKIPPED
  [INFO] Citrus Samples:: Dataprovider ...................... SKIPPED
  [INFO] Citrus Samples:: TestNG Samples .................... SKIPPED
  [INFO] Citrus Samples:: JUnit ............................. SKIPPED
  [INFO] Citrus Samples:: JUnit5 ............................ SKIPPED
  [INFO] Citrus Samples:: JUnit Samples ..................... SKIPPED
  [INFO] Citrus Samples:: Swagger API ....................... SKIPPED
  [INFO] Citrus Samples:: Http .............................. SKIPPED
  [INFO] Citrus Samples:: Http Loadtest ..................... SKIPPED
  [INFO] Citrus Samples:: Http Static Response .............. SKIPPED
  [INFO] Citrus Samples:: Http Query Parameter .............. SKIPPED
  [INFO] Citrus Samples:: Http Form Data .................... SKIPPED
  [INFO] Citrus Samples:: Http Basic Auth ................... SKIPPED
  [INFO] Citrus Samples:: Https ............................. SKIPPED
  [INFO] Citrus Samples:: Http Samples ...................... SKIPPED
  [INFO] Citrus Samples:: RMI ............................... SKIPPED
  [INFO] Citrus Samples:: Reporting ......................... SKIPPED
  [INFO] Citrus Samples:: XHTML ............................. SKIPPED
  [INFO] Citrus Samples:: XML ............................... SKIPPED
  [INFO] Citrus Samples:: OXM ............................... SKIPPED
  [INFO] Citrus Samples:: XML Samples ....................... SKIPPED
  [INFO] Citrus Samples:: JSON .............................. SKIPPED
  [INFO] Citrus Samples:: Databind .......................... SKIPPED
  [INFO] Citrus Samples:: Json Samples ...................... SKIPPED
  [INFO] Citrus Samples:: Hamcrest .......................... SKIPPED
  [INFO] Citrus Samples:: JMS ............................... SKIPPED
  [INFO] Citrus Samples:: Kafka ............................. SKIPPED
  [INFO] Citrus Samples:: Dynamic Endpoints ................. SKIPPED
  [INFO] Citrus Samples:: Binary ............................ SKIPPED
  [INFO] Citrus Samples:: WSDL .............................. SKIPPED
  [INFO] Citrus Samples:: SOAP .............................. SKIPPED
  [INFO] Citrus Samples:: SOAP MTOM ......................... SKIPPED
  [INFO] Citrus Samples:: SOAP Attachments .................. SKIPPED
  [INFO] Citrus Samples:: SOAP WsSecurity ................... SKIPPED
  [INFO] Citrus Samples:: SOAP WsAddressing ................. SKIPPED
  [INFO] Citrus Samples:: SOAP SSL .......................... SKIPPED
  [INFO] Citrus Samples:: SOAP Static Response .............. SKIPPED
  [INFO] Citrus Samples:: SOAP Samples ...................... SKIPPED
  [INFO] Citrus Samples:: SQL ............................... SKIPPED
  [INFO] Citrus Samples:: JDBC .............................. SKIPPED
  [INFO] Citrus Samples:: JDBC Transactions ................. SKIPPED
  [INFO] Citrus Samples:: JDBC Callable Statements .......... SKIPPED
  [INFO] Citrus Samples:: DB Samples ........................ SKIPPED
  [INFO] Citrus Samples:: Test JAR .......................... SKIPPED
  [INFO] Citrus Samples:: Test WAR .......................... SKIPPED
  [INFO] Citrus Samples:: Remote Samples .................... SKIPPED
  [INFO] Citrus Samples:: Parent ............................ SKIPPED
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 30.744 s
  [INFO] Finished at: 2020-02-03T08:39:05-05:00
  [INFO] Final Memory: 38M/386M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.20.1:verify (integration-tests) on project citrus-bakery-web: There are test failures.
  [ERROR]
  [ERROR] Please refer to C:\Users\JO24447\workspace\citrus\citrus-samples\demo\sample-bakery\web\target\failsafe-reports for the individual test results.
  [ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
  [ERROR] -&gt; [Help 1]
  [ERROR]
  [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]
  [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/MojoFailureException
  [ERROR]
  [ERROR] After correcting the problems, you can resume the build with the command
  [ERROR]   mvn &lt;goals&gt; -rf :citrus-bakery-web
  </code></pre>
  
  <p>When I click on the Samples menu button on the Citrus web site, it takes me to a page with lot of sample test scenarios that seem to all be testing a "to-do" application.</p>
  
  <p>There is obviously a lot in the project I pulled down. It's not clear whether everything in it is related to the to-do app, or if there are other exmaple applications with their own sets of tests. E.g. the "bakery".</p>
  
  <p>Should I build just small portions of this project? Is there an expectation that I need to have other apps/utilities installed and running prior to running the maven build?</p>
  
  <p><strong>UPDATE</strong>:</p>
  
  <p>After some trial and error, I finally dropped down into the <code>samples-http/sample-http</code> subdirectory (this is the test scenario I'm initially interested in) and ran the following command:</p>
  
  <pre><code>mvn clean install -Dsystem.under.test.mode=embedded
  </code></pre>
  
  <p>This built the code and ran the integration test successfully. The originally specified maven command (<code>mvn clean install -Dembedded=true</code>) also worked. Are these command variations the same?</p>
  
  <p>It would be good to know what the requirements and expectations there are to be able to successfully build and run/test everything in the samples project.</p>