title: Smooth shutdown for activeMQ after running integrat
body: <p>I am using ActiveMQ to run my integration tests using mvn build. My pom.xml triggers activemq first and then triggers the integration tests so that they can use the above activeMQ instance to transfer messages. </p>
  
  <p>Its working correctly but does not shut down smoothly.. When the mvn build is over and all tests are successful, the build looks good. But activemq spits out the following error while shutting down :-</p>
  
  <pre><code>'[INFO] Apache ActiveMQ 5.7.0 (localhost, ID:LB3290FPF-54398-1427490319466-0:1) is shutting down
  Exception in thread "ActiveMQ ShutdownHook" java.lang.NoClassDefFoundError: org/apache/activemq/transport/vm/VMTransportFactory
  at org.apache.activemq.broker.BrokerService.stop(BrokerService.java:750)
  at org.apache.activemq.xbean.XBeanBrokerService.stop(XBeanBrokerService.java:91)
  at org.apache.activemq.broker.BrokerService.containerShutdown(BrokerService.java:2303)
  at org.apache.activemq.broker.BrokerService$6.run(BrokerService.java:2270)
  Caused by: java.lang.ClassNotFoundException: org.apache.activemq.transport.vm.VMTransportFactory
  at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
  at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
  at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
  at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
  ... 4 more
  [INFO] Connector tcp://localhost:61616?useJmx=true&amp;persistent=false Stopped'
  </code></pre>
  
  <p>Is there a way I enable Maven to shut activeMQ smoothly without above Exceptions when the maven build finishes? Here are some associated details :-</p>
  
  <ol>
  <li>activeMQ uri : <strong>tcp://localhost:61616?useJmx=false&amp;persistent=false</strong></li>
  <li>fork : true</li>
  <li>activeMQ-core : 5.7.0</li>
  <li>maven-activemq-plugin : 5.7.0</li>
  </ol>