title: How to start activemq before your tests and move over to the tests
body: <p>I am trying to test my application which send s a message to a queue (Activemq).</p>
  
  <p>I have a maven test project where it can consume from the javax.jms.MessageConsumer consumer.</p>
  
  <p>If I am to start the activemq within the maven build, I was following the answer <a href="https://stackoverflow.com/questions/29307763/maven-command-to-run-activemq-before-intergation-tests/">here</a>. But that will stop at the point it starts the activemq, and do not move over the build to the test execution.</p>
  
  <p>My build xml section looks like below,</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.apache.activemq.tooling&lt;/groupId&gt;
              &lt;artifactId&gt;maven-activemq-plugin&lt;/artifactId&gt;
              &lt;version&gt;5.7.0&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;phase&gt;process-test-classes&lt;/phase&gt; 
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>I am looking for a way to let maven to move over to the next phase once the activemq started.</p>
  
  <p>I also tried the newer version of the plugin, which is <em>activemq-maven-plugin</em>;</p>
  
  <pre><code>        &lt;plugin&gt;
              &lt;groupId&gt;org.apache.activemq.tooling&lt;/groupId&gt;
              &lt;artifactId&gt;activemq-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;5.15.1&lt;/version&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;run&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;phase&gt;process-test-classes&lt;/phase&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
  </code></pre>
  
  <p>Either case my maven build stops at ...</p>
  
  <pre><code>[INFO] --- maven-compiler-plugin:3.6.1:testCompile (default-testCompile) @ my-automation ---
  [INFO] Changes detected - recompiling the module!
  [INFO] Compiling 7 source files to C:\Users\xyz\my-automation\target\test-classes
  [INFO] 
  [INFO] --- maven-activemq-plugin:5.7.0:run (default) @ my-automation ---
  [INFO] Loading broker configUri: broker:(tcp://localhost:61616)?useJmx=false&amp;persistent=false
  [INFO] Using Persistence Adapter: MemoryPersistenceAdapter
  [INFO] Apache ActiveMQ 5.7.0 (localhost, ID:XYZ-0001:1) is starting
  [INFO] Listening for connections at: tcp://127.0.0.1:61616
  [INFO] Connector tcp://127.0.0.1:61616 Started
  [INFO] Apache ActiveMQ 5.7.0 (localhost, ID:XYZ-0001:1) started
  [INFO] For help or more information please see: http://activemq.apache.org
  </code></pre>
  
  <p>Which is the point where activemq has started.</p>
  
  <p>How can I proceed from this point ?</p>