You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2015/08/07 21:31:28 UTC

[09/18] activemq-artemis git commit: ARTEMIS-180 removing -Pexample and some other improvements around the examples

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-counters/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-counters/pom.xml b/examples/jms/message-counters/pom.xml
index 7cd17e3..a046a37 100644
--- a/examples/jms/message-counters/pom.xml
+++ b/examples/jms/message-counters/pom.xml
@@ -18,7 +18,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<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">
+<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">
    <modelVersion>4.0.0</modelVersion>
 
    <parent>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-message-counters-example</artifactId>
+   <artifactId>message-counters</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Message Counter Example</name>
 
@@ -38,83 +39,88 @@ under the License.
    <dependencies>
       <dependency>
          <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-jms-client</artifactId>
+         <artifactId>artemis-server</artifactId>
          <version>${project.version}</version>
       </dependency>
       <dependency>
          <groupId>org.apache.activemq</groupId>
-         <artifactId>artemis-server</artifactId>
+         <artifactId>artemis-jms-client</artifactId>
          <version>${project.version}</version>
       </dependency>
-      <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
-      </dependency>
    </dependencies>
 
    <profiles>
       <profile>
-         <id>example</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>artemis-maven-plugin</artifactId>
-                  <executions>
-                     <execution>
-                        <id>create</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <javaOptions>-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=3001 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false</javaOptions>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>start</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <spawn>true</spawn>
-                           <testURI>tcp://localhost:61616</testURI>
-                           <args>
-                              <param>run</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.MessageCounterExample</clientClass>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-message-counters-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                   </dependencies>
-               </plugin>
-            </plugins>
-         </build>
+         <!-- specify -PnoServer if you don't want to start the server -->
+         <id>noServer</id>
+         <properties>
+            <noServer>true</noServer>
+         </properties>
       </profile>
    </profiles>
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <javaOptions>-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=3001
+                        -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
+                     </javaOptions>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <testURI>tcp://localhost:61616</testURI>
+                     <args>
+                        <param>run</param>
+                     </args>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.MessageCounterExample</clientClass>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>stop</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <args>
+                        <param>stop</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.jms</groupId>
+                  <artifactId>message-counters</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-counters/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/message-counters/readme.html b/examples/jms/message-counters/readme.html
index 63b5d97..69cbef3 100644
--- a/examples/jms/message-counters/readme.html
+++ b/examples/jms/message-counters/readme.html
@@ -27,6 +27,8 @@ under the License.
   <body onload="prettyPrint()">
      <h1>JMS Message Counter Example</h1>
 
+     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
+
      <p>This example shows you how to use message counters to obtain message information for a JMS queue.</p>
      <p>The example will show how to configure sampling of message counters.<br />
          We will produce and consume 1 message from a queue. Interleaved with the JMS operation, we will retrieve the queue's message counters
@@ -45,9 +47,8 @@ under the License.
          the <code>message-counter-max-day-history</code> parameter.</p>
      <p>The sample period and the max day history parameters have a small impact on the performance of ActiveMQ Artemis (the resources taken to sample a queue are not available to the system's
          normal use). You should set these parameters accordingly to the use and throughput of your messages.</p>
-         
+
      <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
      <ol>
         <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
         <pre class="prettyprint">
@@ -70,7 +71,7 @@ under the License.
             QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
             MessageProducer producer = session.createProducer(queue);</code>
        </pre>
-       
+
         <li>We create and send a JMS text message</li>
         <pre class="prettyprint">
             <code>TextMessage message = session.createTextMessage("This is a text message");
@@ -84,7 +85,7 @@ under the License.
             <code>System.out.println("Sleep a little bit to have the queue sampled...");
             Thread.sleep(3000);</code>
         </pre>
-        
+
         <p>We now need to retrieve the message counters. They're available from the JMS Queue management resource. In this example, we
             will retrieve them using JMX (see the <a href="../jmx/readme.html">JMX example</a> for a more complete description). You can also use JMS message to retrieve them (see the <a href="../management/readme.html">Management example</a> to
             learn about managing ActiveMQ Artemis using JMS messages).</p>
@@ -106,12 +107,12 @@ under the License.
             <code>String counters = queueControl.listMessageCounter();
             MessageCounterInfo messageCounter = MessageCounterInfo.fromJSON(counters);</code>>
         </pre>
-        
+
         <li>We display the message counters</li>
         <pre class="prettyprint">
             <code>displayMessageCounter(messageCounter);</code>
         </pre>
-        
+
         <p>The message counter contains a variety of metrics on the queue which is sampled (total messages added to the queue, current depth of the queue, deltas since the last sample, timestamp
             of the last message added, timestamp of the last sample, etc.)</p>
         <pre class="prettyprint">
@@ -119,34 +120,34 @@ under the License.
             private void displayMessageCounter(MessageCounterInfo counter)
             {
                System.out.format("%s (sample updated at %s)\n",  counter.getName(), counter.getUdpateTimestamp());
-               System.out.format("   %s message(s) added to the queue (since last sample: %s)\n", counter.getCount(), 
+               System.out.format("   %s message(s) added to the queue (since last sample: %s)\n", counter.getCount(),
                                                                                                   counter.getCountDelta());
                System.out.format("   %s message(s) in the queue (since last sample: %s)\n", counter.getDepth(),
                                                                                             counter.getDepthDelta());
                System.out.format("   last message added at %s\n\n", counter.getLastAddTimestamp());
             }</code>
         </pre>
-                
+
         <li>We sleep again to have the queue sampled</li>
         <pre class="prettyprint">
             <code>System.out.println("Sleep a little bit again...");
             Thread.sleep(3000);</code>
         </pre>
-        
+
         <li>We list the message counters again</li>
         <pre class="prettyprint">
             <code>counters = queueControl.listMessageCounter();
             messageCounter = MessageCounterInfo.fromJSON(counters);
             displayMessageCounter(messageCounter);</code>
         </pre>
-        
+
         <p>We will now consume a message from the queue before listing a last time the message counters</p>
-        
+
         <li>We create a consumer for the queue</li>
         <pre class="prettyprint">
             <code>MessageConsumer consumer = session.createConsumer(queue);</code>
         </pre>
-        
+
         <li>We start the connection to receive messages on the consumer</li>
         <pre class="prettyprint">
            <code>connection.start();</code>
@@ -157,13 +158,13 @@ under the License.
            <code>TextMessage messageReceived = (TextMessage)consumer.receive(5000);
            System.out.format("Received message: %s\n\n", messageReceived.getText());</code>
         </pre>
-        
+
         <li>We sleep one last time to have the queue sampled</li>
         <pre class="prettyprint">
             <code>System.out.println("Sleep a little bit one last time...");
             Thread.sleep(3000);</code>
         </pre>
-        
+
         <li>We list the message counters a final time (this time with no message in the queue)</li>
         <pre class="prettyprint">
             <code>counters = queueControl.listMessageCounter();
@@ -171,7 +172,7 @@ under the License.
             displayMessageCounter(messageCounter);</code>
         </pre>
 
-        </p>    
+        </p>
         <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
 
         <pre class="prettyprint">
@@ -188,9 +189,9 @@ under the License.
            }</code>
         </pre>
      </ol>
-     
+
      <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#management.message-counters">Message Counters chapter</a></li>
-     <li><a href="../../../docs/api/org/jboss/messaging/core/management/MessageCounterInfo.html">MessageCounterInfo</a> is a helper class used 
+     <li><a href="../../../docs/api/org/jboss/messaging/core/management/MessageCounterInfo.html">MessageCounterInfo</a> is a helper class used
         to create a MessageCounterInfo object from the JSON String which represents message counters</li>
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-group/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-group/pom.xml b/examples/jms/message-group/pom.xml
index cfd67fb..cfd354c 100644
--- a/examples/jms/message-group/pom.xml
+++ b/examples/jms/message-group/pom.xml
@@ -18,7 +18,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<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">
+<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">
    <modelVersion>4.0.0</modelVersion>
 
    <parent>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-message-group-example</artifactId>
+   <artifactId>message-group</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Message Group Example</name>
 
@@ -37,71 +38,81 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
+         <version>${project.version}</version>
       </dependency>
    </dependencies>
 
    <profiles>
       <profile>
-         <id>example</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>artemis-maven-plugin</artifactId>
-                  <executions>
-                     <execution>
-                        <id>create</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                     </execution>
-                     <execution>
-                        <id>start</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <spawn>true</spawn>
-                           <testURI>tcp://localhost:61616</testURI>
-                           <args>
-                              <param>run</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.MessageGroupExample</clientClass>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-message-group-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                  </dependencies>
-                </plugin>
-            </plugins>
-         </build>
+         <!-- specify -PnoServer if you don't want to start the server -->
+         <id>noServer</id>
+         <properties>
+            <noServer>true</noServer>
+         </properties>
       </profile>
    </profiles>
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <testURI>tcp://localhost:61616</testURI>
+                     <args>
+                        <param>run</param>
+                     </args>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.MessageGroupExample</clientClass>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>stop</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <args>
+                        <param>stop</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.jms</groupId>
+                  <artifactId>message-group</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-group/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/message-group/readme.html b/examples/jms/message-group/readme.html
index e44aa51..3513e8e 100644
--- a/examples/jms/message-group/readme.html
+++ b/examples/jms/message-group/readme.html
@@ -27,13 +27,15 @@ under the License.
   <body onload="prettyPrint()">
      <h1>Message Group Example</h1>
 
+     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
+
      <p>This example shows you how to configure and use message groups with ActiveMQ Artemis.</p>
-     
+
      <p>Message groups are sets of messages that has the following characteristics: </p>
      <li>Messages in a message group share the same group id, i.e. they have same JMSXGroupID string property values.</li>
      <li>Messages in a message group will be all delivered to no more than one of the queue's consumers. The consumer that receives the
      first message of a group will receive all the messages that belong to the group.</li>
-     
+
      <p>You can make any message belong to a message group by setting its 'JMXGroupID' string property to the group id.
      In this example we create a message group 'Group-0'. And make such a message group of 10 messages. It also create two consumers on the queue
      where the 10 'Group-0' group messages are to be sent. You can see that with message grouping enabled, all the 10 messages will be received by
@@ -45,7 +47,6 @@ under the License.
         be part of this message group.</p>
 
      <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
 
      <ol>
         <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
@@ -140,12 +141,12 @@ under the License.
            }</code>
         </pre>
      </ol>
-     
+
      <h2>More information</h2>
-     
+
      <ul>
          <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#message-grouping">Message Grouping chapter</a></li>
      </ul>
-     
+
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java b/examples/jms/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java
index ea7e447..7acf3c4 100644
--- a/examples/jms/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java
+++ b/examples/jms/message-group/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroupExample.java
@@ -16,11 +16,7 @@
  */
 package org.apache.activemq.artemis.jms.example;
 
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
 import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
@@ -29,7 +25,11 @@ import javax.jms.MessageProducer;
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import javax.naming.InitialContext;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 
 /**
  * A simple JMS Queue example that sends and receives message groups.
@@ -40,17 +40,14 @@ public class MessageGroupExample
    {
       final Map<String, String> messageReceiverMap = new ConcurrentHashMap<String, String>();
       Connection connection = null;
-      InitialContext initialContext = null;
       try
       {
-         // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
 
          // Step 2. Perform a lookup on the queue
-         Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+         Queue queue = ActiveMQJMSClient.createQueue("queue/exampleQueue");
 
          // Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
+         ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory();
 
          // Step 4. Create a JMS Connection
          connection = cf.createConnection();
@@ -95,14 +92,12 @@ public class MessageGroupExample
                throw new IllegalStateException("Group message [" + grpMsg.getText() + "[ went to wrong receiver: " + receiver);
             }
          }
+
+         cf.close();
       }
       finally
       {
          // Step 11. Be sure to close our JMS resources!
-         if (initialContext != null)
-         {
-            initialContext.close();
-         }
          if (connection != null)
          {
             connection.close();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-group2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-group2/pom.xml b/examples/jms/message-group2/pom.xml
index 6f23575..46eed3a 100644
--- a/examples/jms/message-group2/pom.xml
+++ b/examples/jms/message-group2/pom.xml
@@ -18,7 +18,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<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">
+<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">
    <modelVersion>4.0.0</modelVersion>
 
    <parent>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-message-group2-example</artifactId>
+   <artifactId>message-group2</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Message Group Example 2</name>
 
@@ -37,71 +38,81 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
+         <version>${project.version}</version>
       </dependency>
    </dependencies>
 
    <profiles>
       <profile>
-         <id>example</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>artemis-maven-plugin</artifactId>
-                  <executions>
-                     <execution>
-                        <id>create</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                     </execution>
-                     <execution>
-                        <id>start</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <spawn>true</spawn>
-                           <testURI>tcp://localhost:61616</testURI>
-                           <args>
-                              <param>run</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.MessageGroup2Example</clientClass>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-message-group2-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                  </dependencies>
-               </plugin>
-            </plugins>
-         </build>
+         <!-- specify -PnoServer if you don't want to start the server -->
+         <id>noServer</id>
+         <properties>
+            <noServer>true</noServer>
+         </properties>
       </profile>
    </profiles>
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <testURI>tcp://localhost:61616</testURI>
+                     <args>
+                        <param>run</param>
+                     </args>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.MessageGroup2Example</clientClass>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>stop</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <args>
+                        <param>stop</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.jms</groupId>
+                  <artifactId>message-group2</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-group2/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/message-group2/readme.html b/examples/jms/message-group2/readme.html
index a5d85ac..911852c 100644
--- a/examples/jms/message-group2/readme.html
+++ b/examples/jms/message-group2/readme.html
@@ -27,13 +27,16 @@ under the License.
   <body onload="prettyPrint()">
      <h1>Message Group Example</h1>
 
+     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
+
+
      <p>This example shows you how to configure and use message groups via a connection factory with ActiveMQ Artemis.</p>
-     
+
      <p>Message groups are sets of messages that has the following characteristics: </p>
      <li>Messages in a message group share the same group id, i.e. they have same JMSXGroupID string property values.</li>
      <li>Messages in a message group will be all delivered to no more than one of the queue's consumers. The consumer that receives the
      first message of a group will receive all the messages that belongs to the group.</li>
-     
+
      <p>You can make any message belong to a message group by setting a 'group-id' on the connection factory. All producers created via this connection factory will set that group id on its messages.
      In this example we set the group id 'Group-0'on a connection factory and send messages via 2 different producers and check that only 1 consumer receives them. </p>
 
@@ -43,7 +46,6 @@ under the License.
         be part of this message group.</p>
 
      <h2>Example step-by-step</h2>
-     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
      <ol>
         <li>First we need to get an initial context so we can look-up the JMS connection factory and destination objects from JNDI. This initial context will get it's properties from the <code>client-jndi.properties</code> file in the directory <code>../common/config</code></li>
         <pre class="prettyprint">
@@ -148,12 +150,12 @@ under the License.
            }</code>
         </pre>
      </ol>
-     
+
      <h2>More information</h2>
-     
+
      <ul>
          <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#message-grouping2">Message Grouping chapter</a></li>
      </ul>
-     
+
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java
----------------------------------------------------------------------
diff --git a/examples/jms/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java b/examples/jms/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java
index d53a125..c70c932 100644
--- a/examples/jms/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java
+++ b/examples/jms/message-group2/src/main/java/org/apache/activemq/artemis/jms/example/MessageGroup2Example.java
@@ -16,11 +16,7 @@
  */
 package org.apache.activemq.artemis.jms.example;
 
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
 import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
@@ -29,7 +25,11 @@ import javax.jms.MessageProducer;
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import javax.naming.InitialContext;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 
 /**
  * A simple JMS Queue example that sends and receives message groups.
@@ -42,17 +42,13 @@ public class MessageGroup2Example
    {
       final Map<String, String> messageReceiverMap = new ConcurrentHashMap<String, String>();
       Connection connection = null;
-      InitialContext initialContext = null;
       try
       {
-         //Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
-
          //Step 2. Perform a lookup on the queue
-         Queue queue = (Queue) initialContext.lookup("queue/exampleQueue");
+         Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
 
          //Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("ConnectionFactory");
+         ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616?groupID=Group-0");
 
          //Step 4. Create a JMS Connection
          connection = cf.createConnection();
@@ -110,10 +106,6 @@ public class MessageGroup2Example
       finally
       {
          //Step 11. Be sure to close our JMS resources!
-         if (initialContext != null)
-         {
-            initialContext.close();
-         }
          if(connection != null)
          {
             connection.close();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-group2/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/message-group2/src/main/resources/jndi.properties b/examples/jms/message-group2/src/main/resources/jndi.properties
deleted file mode 100644
index 5adc898..0000000
--- a/examples/jms/message-group2/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616?groupID=Group-0
-queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-priority/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/message-priority/pom.xml b/examples/jms/message-priority/pom.xml
index 6956310..b7a4d05 100644
--- a/examples/jms/message-priority/pom.xml
+++ b/examples/jms/message-priority/pom.xml
@@ -18,7 +18,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<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">
+<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">
    <modelVersion>4.0.0</modelVersion>
 
    <parent>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-message-priority-example</artifactId>
+   <artifactId>message-priority</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS MessagePriorityExample Example</name>
 
@@ -37,71 +38,81 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
+         <version>${project.version}</version>
       </dependency>
    </dependencies>
 
    <profiles>
       <profile>
-         <id>example</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>artemis-maven-plugin</artifactId>
-                  <executions>
-                     <execution>
-                        <id>create</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                     </execution>
-                     <execution>
-                        <id>start</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <spawn>true</spawn>
-                           <testURI>tcp://localhost:61616</testURI>
-                           <args>
-                              <param>run</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.MessagePriorityExample</clientClass>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-message-priority-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                   </dependencies>
-               </plugin>
-            </plugins>
-         </build>
+         <!-- specify -PnoServer if you don't want to start the server -->
+         <id>noServer</id>
+         <properties>
+            <noServer>true</noServer>
+         </properties>
       </profile>
    </profiles>
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <testURI>tcp://localhost:61616</testURI>
+                     <args>
+                        <param>run</param>
+                     </args>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.MessagePriorityExample</clientClass>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>stop</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <args>
+                        <param>stop</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.jms</groupId>
+                  <artifactId>message-priority</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-priority/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/message-priority/readme.html b/examples/jms/message-priority/readme.html
index 96af7e2..9dd995c 100644
--- a/examples/jms/message-priority/readme.html
+++ b/examples/jms/message-priority/readme.html
@@ -27,22 +27,25 @@ under the License.
   <body onload="prettyPrint()">
      <h1>JMS Message Priority Example</h1>
 
+     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
+
+
      <p>This example shows how messages with different priorities are delivered in different orders.</p>
-     
+
      <p>The Message Priority property carries the delivery preference of sent messages. It can be set by the message's
      standard header field 'JMSPriority' as defined in JMS specification version 1.1. The value is of type
      integer, ranging from 0 (the lowest) to 9 (the highest). When messages are being delivered, their priorities
-     will effect their order of delivery. Messages of higher priorities will likely be delivered before those 
-     of lower priorities. Messages of equal priorities are delivered in the natural order of their arrival at 
+     will effect their order of delivery. Messages of higher priorities will likely be delivered before those
+     of lower priorities. Messages of equal priorities are delivered in the natural order of their arrival at
      their destinations. Please consult the JMS 1.1 specification for full details.</p>
-     
+
      <p>In this example, three messages are sent to a queue with different priorities. The first message is sent
      with default priority (4), the second is sent with a higher priority (5), and the third has the highest
-     priority (9). At the receiving end, we will show the order of receiving of the three messages. You will 
-     see that the third message, though last sent, will 'jump' forward to be the first one received. The second 
+     priority (9). At the receiving end, we will show the order of receiving of the three messages. You will
+     see that the third message, though last sent, will 'jump' forward to be the first one received. The second
      is also received ahead of the message first sent, but behind the third message. The first message, regardless
      of its being sent first, arrives last.</p>
-     
+
      <h2>Example step-by-step</h2>
      <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
 
@@ -135,7 +138,7 @@ under the License.
            }
            </code>
         </pre>
-        
+
         <li>And finally, <b>always</b> remember to close your JMS connections and resources after use, in a <code>finally</code> block. Closing a JMS connection will automatically close all of its sessions, consumers, producer and browser objects</li>
 
         <pre class="prettyprint">

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java b/examples/jms/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java
index 6435efe..5f137fe 100644
--- a/examples/jms/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java
+++ b/examples/jms/message-priority/src/main/java/org/apache/activemq/artemis/jms/example/MessagePriorityExample.java
@@ -32,6 +32,9 @@ import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.naming.InitialContext;
 
+import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
+
 /**
  * A simple JMS example that shows the delivery order of messages with priorities.
  */
@@ -42,17 +45,14 @@ public class MessagePriorityExample
       AtomicBoolean result = new AtomicBoolean(true);
       final ArrayList<TextMessage> msgReceived = new ArrayList<TextMessage>();
       Connection connection = null;
-      InitialContext initialContext = null;
       try
       {
-         // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
 
          // Step 2. look-up the JMS queue object from JNDI
-         Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+         Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
 
          // Step 3. look-up the JMS connection factory object from JNDI
-         ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
+         ConnectionFactory cf = new ActiveMQConnectionFactory();
 
          // Step 4. Create a JMS Connection
          connection = cf.createConnection();
@@ -109,10 +109,6 @@ public class MessagePriorityExample
       finally
       {
          // Step 13. Be sure to close our JMS resources!
-         if (initialContext != null)
-         {
-            initialContext.close();
-         }
          if (connection != null)
          {
             connection.close();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/message-priority/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/message-priority/src/main/resources/jndi.properties b/examples/jms/message-priority/src/main/resources/jndi.properties
deleted file mode 100644
index 93537c4..0000000
--- a/examples/jms/message-priority/src/main/resources/jndi.properties
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-java.naming.factory.initial=org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory
-connectionFactory.ConnectionFactory=tcp://localhost:61616
-queue.queue/exampleQueue=exampleQueue

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/multiple-failover-failback/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover-failback/pom.xml b/examples/jms/multiple-failover-failback/pom.xml
index 4ae6e9e..c44a63f 100644
--- a/examples/jms/multiple-failover-failback/pom.xml
+++ b/examples/jms/multiple-failover-failback/pom.xml
@@ -18,7 +18,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<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">
+<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">
    <modelVersion>4.0.0</modelVersion>
 
    <parent>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-multiple-failover-failback-example</artifactId>
+   <artifactId>multiple-failover-failback</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Multiple Failover Failback Example</name>
 
@@ -47,79 +48,74 @@ under the License.
       </dependency>
    </dependencies>
 
-   <profiles>
-      <profile>
-         <id>example</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>artemis-maven-plugin</artifactId>
-                  <executions>
-                     <execution>
-                        <id>create0</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server0</instance>
-                           <sharedStore>true</sharedStore>
-                           <slave>false</slave>
-                           <dataFolder>../data</dataFolder>
-                           <failoverOnShutdown>true</failoverOnShutdown>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>create1</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server1</instance>
-                           <sharedStore>true</sharedStore>
-                           <slave>true</slave>
-                           <dataFolder>../data</dataFolder>
-                           <failoverOnShutdown>true</failoverOnShutdown>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>create2</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server2</instance>
-                           <sharedStore>true</sharedStore>
-                           <slave>true</slave>
-                           <dataFolder>../data</dataFolder>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.MultipleFailoverFailbackExample</clientClass>
-                           <args>
-                              <param>${basedir}/target/server0</param>
-                              <param>${basedir}/target/server1</param>
-                              <param>${basedir}/target/server2</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-multiple-failover-failback-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                  </dependencies>
-                </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create0</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <instance>${basedir}/target/server0</instance>
+                     <sharedStore>true</sharedStore>
+                     <slave>false</slave>
+                     <dataFolder>../data</dataFolder>
+                     <failoverOnShutdown>true</failoverOnShutdown>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <instance>${basedir}/target/server1</instance>
+                     <sharedStore>true</sharedStore>
+                     <slave>true</slave>
+                     <dataFolder>../data</dataFolder>
+                     <failoverOnShutdown>true</failoverOnShutdown>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create2</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <instance>${basedir}/target/server2</instance>
+                     <sharedStore>true</sharedStore>
+                     <slave>true</slave>
+                     <dataFolder>../data</dataFolder>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.MultipleFailoverFailbackExample</clientClass>
+                     <args>
+                        <param>${basedir}/target/server0</param>
+                        <param>${basedir}/target/server1</param>
+                        <param>${basedir}/target/server2</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.jms</groupId>
+                  <artifactId>multiple-failover-failback</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/multiple-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/multiple-failover/pom.xml b/examples/jms/multiple-failover/pom.xml
index cb00084..3323ad5 100644
--- a/examples/jms/multiple-failover/pom.xml
+++ b/examples/jms/multiple-failover/pom.xml
@@ -18,7 +18,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<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">
+<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">
    <modelVersion>4.0.0</modelVersion>
 
    <parent>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-multiple-failover-example</artifactId>
+   <artifactId>multiple-failover</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Multiple Failover Example</name>
 
@@ -47,79 +48,74 @@ under the License.
       </dependency>
    </dependencies>
 
-   <profiles>
-      <profile>
-         <id>example</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>artemis-maven-plugin</artifactId>
-                  <executions>
-                     <execution>
-                        <id>create0</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server0</instance>
-                           <sharedStore>true</sharedStore>
-                           <slave>false</slave>
-                           <dataFolder>../data</dataFolder>
-                           <failoverOnShutdown>true</failoverOnShutdown>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>create1</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server1</instance>
-                           <sharedStore>true</sharedStore>
-                           <slave>true</slave>
-                           <dataFolder>../data</dataFolder>
-                           <failoverOnShutdown>true</failoverOnShutdown>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>create2</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server2</instance>
-                           <sharedStore>true</sharedStore>
-                           <slave>true</slave>
-                           <dataFolder>../data</dataFolder>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.MultipleFailoverExample</clientClass>
-                           <args>
-                              <param>${basedir}/target/server0</param>
-                              <param>${basedir}/target/server1</param>
-                              <param>${basedir}/target/server2</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-multiple-failover-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                  </dependencies>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create0</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <instance>${basedir}/target/server0</instance>
+                     <sharedStore>true</sharedStore>
+                     <slave>false</slave>
+                     <dataFolder>../data</dataFolder>
+                     <failoverOnShutdown>true</failoverOnShutdown>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <instance>${basedir}/target/server1</instance>
+                     <sharedStore>true</sharedStore>
+                     <slave>true</slave>
+                     <dataFolder>../data</dataFolder>
+                     <failoverOnShutdown>true</failoverOnShutdown>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create2</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <instance>${basedir}/target/server2</instance>
+                     <sharedStore>true</sharedStore>
+                     <slave>true</slave>
+                     <dataFolder>../data</dataFolder>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.MultipleFailoverExample</clientClass>
+                     <args>
+                        <param>${basedir}/target/server0</param>
+                        <param>${basedir}/target/server1</param>
+                        <param>${basedir}/target/server2</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.jms</groupId>
+                  <artifactId>multiple-failover</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/no-consumer-buffering/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/pom.xml b/examples/jms/no-consumer-buffering/pom.xml
index 19d9178..dcd0236 100644
--- a/examples/jms/no-consumer-buffering/pom.xml
+++ b/examples/jms/no-consumer-buffering/pom.xml
@@ -18,7 +18,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<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">
+<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">
    <modelVersion>4.0.0</modelVersion>
 
    <parent>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-no-consumer-buffering-example</artifactId>
+   <artifactId>no-consumer-buffering</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS No Consumer Buffering Example</name>
 
@@ -37,70 +38,80 @@ under the License.
 
    <dependencies>
       <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
+         <version>${project.version}</version>
       </dependency>
    </dependencies>
 
    <profiles>
       <profile>
-         <id>example</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>artemis-maven-plugin</artifactId>
-                  <executions>
-                     <execution>
-                        <id>create</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                     </execution>
-                     <execution>
-                        <id>start</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <spawn>true</spawn>
-                           <testURI>tcp://localhost:61616</testURI>
-                           <args>
-                              <param>run</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.NoConsumerBufferingExample</clientClass>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>cli</goal>
-                        </goals>
-                        <configuration>
-                           <args>
-                              <param>stop</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-no-consumer-buffering-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                  </dependencies>
-               </plugin>
-            </plugins>
-         </build>
+         <!-- specify -PnoServer if you don't want to start the server -->
+         <id>noServer</id>
+         <properties>
+            <noServer>true</noServer>
+         </properties>
       </profile>
    </profiles>
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>start</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <spawn>true</spawn>
+                     <testURI>tcp://localhost:61616</testURI>
+                     <args>
+                        <param>run</param>
+                     </args>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.NoConsumerBufferingExample</clientClass>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>stop</id>
+                  <goals>
+                     <goal>cli</goal>
+                  </goals>
+                  <configuration>
+                     <ignore>${noServer}</ignore>
+                     <args>
+                        <param>stop</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.jms</groupId>
+                  <artifactId>no-consumer-buffering</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/no-consumer-buffering/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/readme.html b/examples/jms/no-consumer-buffering/readme.html
index f05480b..7f5e427 100644
--- a/examples/jms/no-consumer-buffering/readme.html
+++ b/examples/jms/no-consumer-buffering/readme.html
@@ -27,6 +27,9 @@ under the License.
   <body onload="prettyPrint()">
      <h1>No Consumer Buffering Example</h1>
 
+     <pre>To run the example, simply type <b>mvn verify</b> from this directory, <br>or <b>mvn -PnoServer verify</b> if you want to start and create the server manually.</pre>
+
+
      <p>By default, ActiveMQ Artemis consumers buffer messages from the server in a client side buffer
      before actual delivery actually occurs.</p>
      <p>This improves performance since otherwise every time you called receive() or had processed the last
@@ -41,7 +44,7 @@ under the License.
      <p>If orders were buffered in each consumer, and a new consumer was added that consumer would not be able
      to process orders which were already in the client side buffer of another consumer.</p>
      <p>To turn off client side buffering of messages, set <code>consumer-window-size</code> to zero.</p>
-     
+
      <p>With ActiveMQ Artemis you can specify a maximum consume rate at which a JMS MessageConsumer will consume messages.
      This can be specified when creating or deploying the connection factory. See <code>activemq-jms.xml</code></p>
      <h2>Example step-by-step</h2>
@@ -52,13 +55,13 @@ under the License.
    &lt;connection-factory name="ConnectionFactory"&gt;
       &lt;connector-ref connector-name="netty-connector"/&gt;
       &lt;entries&gt;
-         &lt;entry name="ConnectionFactory"/&gt;       
+         &lt;entry name="ConnectionFactory"/&gt;
       &lt;/entries&gt;
-      
+
       &lt;!-- We set the consumer window size to 0, which means messages are not buffered at all
       on the client side --&gt;
       &lt;consumer-window-size&gt;0&lt;/consumer-window-size&gt;
-      
+
    &lt;/connection-factory&gt;
      </code>
      </pre>
@@ -67,9 +70,7 @@ under the License.
      <p>We then consume messages from each consumer in a semi-random order. We note that the messages
      are consumed in the order they were sent.</p>
      <p>If the messages had been buffered in each consumer they would not be available to be consumed
-     in an order determined afer delivery.</p>    
-
-     <p><i>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</i></p>
+     in an order determined afer delivery.</p>
 
      <ol>
         <li>Create an initial context to perform the JNDI lookup.</li>
@@ -106,74 +107,74 @@ under the License.
         <pre class="prettyprint">
            <code>MessageConsumer consumer1 = session.createConsumer(queue);</code>
         </pre>
-        
+
         <li>Start the connection</li>
-        
+
         <pre class="prettyprint">
            <code>
      connection.start();
            </code>
         </pre>
-           
+
 
         <li>Send 10 messages to the queue</li>
         <pre class="prettyprint">
            <code>
      final int numMessages = 10;
-         
+
      for (int i = 0; i < numMessages; i++)
      {
         TextMessage message = session.createTextMessage("This is text message: " + i);
 
         producer.send(message);
-     }           
+     }
            </code>
         </pre>
-        
+
         <li>Create another JMS MessageConsumer on the same queue.</li>
         <pre class="prettyprint">
            <code>MessageConsumer consumer2 = session.createConsumer(queue);</code>
         </pre>
-        
+
         <li>Consume three messages from consumer2</li>
-        
+
         <pre class="prettyprint">
            <code>
    for (int i = 0; i < 3; i++)
-   {         
+   {
       TextMessage message = (TextMessage)consumer2.receive(2000);
-            
+
       System.out.println("Consumed message from consumer2: " + message.getText());
-   }    
+   }
            </code>
         </pre>
-        
+
         <li>Consume five messages from consumer1</li>
-        
+
         <pre class="prettyprint">
            <code>
    for (int i = 0; i < 5; i++)
-   {         
+   {
       TextMessage message = (TextMessage)consumer1.receive(2000);
-            
+
       System.out.println("Consumed message from consumer1: " + message.getText());
-   }    
+   }
            </code>
-        </pre> 
-               
+        </pre>
+
         <li>Consume two more messages from consumer2</li>
-        
+
         <pre class="prettyprint">
            <code>
    for (int i = 0; i < 2; i++)
-   {         
+   {
       TextMessage message = (TextMessage)consumer1.receive(2000);
-            
+
       System.out.println("Consumed message from consumer2: " + message.getText());
-   }    
+   }
            </code>
-        </pre>                
-        
+        </pre>
+
 
         <li>Be sure to close our resources!</li>
 
@@ -185,7 +186,7 @@ under the License.
               {
                 initialContext.close();
               }
-              
+
               if (connection != null)
               {
                  connection.close();
@@ -195,7 +196,7 @@ under the License.
      </ol>
 
      <h2>More information</h2>
-     
+
      <ul>
          <li>User Manual's <a href="../../../docs/user-manual/en/html_single/index.html#flow-control.consumer.window">Consumer Window-Based Flow Control chapter</a></li>
      </ul>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/artemis/jms/example/NoConsumerBufferingExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/artemis/jms/example/NoConsumerBufferingExample.java b/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/artemis/jms/example/NoConsumerBufferingExample.java
index 525a9c4..c7fdf56 100644
--- a/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/artemis/jms/example/NoConsumerBufferingExample.java
+++ b/examples/jms/no-consumer-buffering/src/main/java/org/apache/activemq/artemis/jms/example/NoConsumerBufferingExample.java
@@ -23,7 +23,9 @@ import javax.jms.MessageProducer;
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import javax.naming.InitialContext;
+
+import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 
 /**
  * This example demonstrates how ActiveMQ Artemis consumers can be configured to not buffer any messages from
@@ -34,17 +36,13 @@ public class NoConsumerBufferingExample
    public static void main(final String[] args) throws Exception
    {
       Connection connection = null;
-      InitialContext initialContext = null;
       try
       {
-         // Step 1. Create an initial context to perform the JNDI lookup.
-         initialContext = new InitialContext();
-
          // Step 2. Perfom a lookup on the queue
-         Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
+         Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
 
-         // Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
+         // Step 3. new Connection factory with consumerWindowsize=0
+         ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616?consumerWindowSize=0");
 
          // Step 4. Create a JMS Connection
          connection = cf.createConnection();
@@ -110,10 +108,6 @@ public class NoConsumerBufferingExample
       finally
       {
          // Step 9. Be sure to close our resources!
-         if (initialContext != null)
-         {
-            initialContext.close();
-         }
 
          if (connection != null)
          {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/non-transaction-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/non-transaction-failover/pom.xml b/examples/jms/non-transaction-failover/pom.xml
index 72d4636..6dec19e 100644
--- a/examples/jms/non-transaction-failover/pom.xml
+++ b/examples/jms/non-transaction-failover/pom.xml
@@ -18,7 +18,8 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<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">
+<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">
    <modelVersion>4.0.0</modelVersion>
 
    <parent>
@@ -27,7 +28,7 @@ under the License.
       <version>1.0.1-SNAPSHOT</version>
    </parent>
 
-   <artifactId>artemis-jms-non-transaction-failover-example</artifactId>
+   <artifactId>non-transaction-failover</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Non Transaction Failover Example</name>
 
@@ -42,71 +43,67 @@ under the License.
          <version>${project.version}</version>
       </dependency>
       <dependency>
-         <groupId>org.apache.geronimo.specs</groupId>
-         <artifactId>geronimo-jms_2.0_spec</artifactId>
+         <groupId>org.apache.activemq</groupId>
+         <artifactId>artemis-jms-client</artifactId>
+         <version>${project.version}</version>
       </dependency>
    </dependencies>
 
-   <profiles>
-      <profile>
-         <id>example</id>
-         <build>
-            <plugins>
-               <plugin>
-                  <groupId>org.apache.activemq</groupId>
-                  <artifactId>artemis-maven-plugin</artifactId>
-                  <executions>
-                     <execution>
-                        <id>create0</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server0</instance>
-                           <sharedStore>true</sharedStore>
-                           <slave>false</slave>
-                           <dataFolder>../data</dataFolder>
-                           <failoverOnShutdown>true</failoverOnShutdown>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>create1</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                        <configuration>
-                           <instance>${basedir}/target/server1</instance>
-                           <sharedStore>true</sharedStore>
-                           <slave>true</slave>
-                           <dataFolder>../data</dataFolder>
-                           <failoverOnShutdown>true</failoverOnShutdown>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.NonTransactionFailoverExample</clientClass>
-                           <args>
-                              <param>${basedir}/target/server0</param>
-                              <param>${basedir}/target/server1</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-non-transaction-failover-example</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                   </dependencies>
-               </plugin>
-            </plugins>
-         </build>
-      </profile>
-   </profiles>
+   <build>
+      <plugins>
+         <plugin>
+            <groupId>org.apache.activemq</groupId>
+            <artifactId>artemis-maven-plugin</artifactId>
+            <executions>
+               <execution>
+                  <id>create0</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <instance>${basedir}/target/server0</instance>
+                     <sharedStore>true</sharedStore>
+                     <slave>false</slave>
+                     <dataFolder>../data</dataFolder>
+                     <failoverOnShutdown>true</failoverOnShutdown>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>create1</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+                  <configuration>
+                     <instance>${basedir}/target/server1</instance>
+                     <sharedStore>true</sharedStore>
+                     <slave>true</slave>
+                     <dataFolder>../data</dataFolder>
+                     <failoverOnShutdown>true</failoverOnShutdown>
+                  </configuration>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.NonTransactionFailoverExample</clientClass>
+                     <args>
+                        <param>${basedir}/target/server0</param>
+                        <param>${basedir}/target/server1</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.jms</groupId>
+                  <artifactId>non-transaction-failover</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>