activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [10/18] activemq-artemis git commit: ARTEMIS-180 removing -Pexample and some other improvements around the examples
Date Fri, 07 Aug 2015 19:31:29 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jms-completion-listener/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-completion-listener/pom.xml b/examples/jms/jms-completion-listener/pom.xml
index ef5fb76..7561551 100644
--- a/examples/jms/jms-completion-listener/pom.xml
+++ b/examples/jms/jms-completion-listener/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-completion-listener-example</artifactId>
+   <artifactId>completion-listener</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Completion Listener Example</name>
 
@@ -37,71 +38,82 @@ 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.JMSCompletionListenerExample</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-completion-listener-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>${basedir}/target/classes/activemq/server0</configuration>
+                  </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.JMSCompletionListenerExample</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>completion-listener</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/jms-completion-listener/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/jms-completion-listener/readme.html b/examples/jms/jms-completion-listener/readme.html
index c29066a..f9d39ad 100644
--- a/examples/jms/jms-completion-listener/readme.html
+++ b/examples/jms/jms-completion-listener/readme.html
@@ -27,11 +27,12 @@ under the License.
   <body onload="prettyPrint()">
      <h1>JMS Completion Listener 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 send a message asynchronously to ActiveMQ Artemis and use a CompletionListener to be notified of
      the Broker receiving it</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>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/artemis/jms/example/JMSCompletionListenerExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/artemis/jms/example/JMSCompletionListenerExample.java b/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/artemis/jms/example/JMSCompletionListenerExample.java
index 47a61cb..5de38cb 100644
--- a/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/artemis/jms/example/JMSCompletionListenerExample.java
+++ b/examples/jms/jms-completion-listener/src/main/java/org/apache/activemq/artemis/jms/example/JMSCompletionListenerExample.java
@@ -29,6 +29,9 @@ import java.lang.IllegalStateException;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
+import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
+
 /**
  * A JMS Completion Listener Example.
  */
@@ -36,18 +39,14 @@ public class JMSCompletionListenerExample
 {
    public static void main(final String[] args) throws Exception
    {
-      InitialContext initialContext = null;
       JMSContext jmsContext = 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");
+         ConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616?confirmationWindowSize=10240");
 
          // Step 4.Create a JMS Context
          jmsContext = cf.createContext();
@@ -85,11 +84,6 @@ public class JMSCompletionListenerExample
       }
       finally
       {
-         // Step 8. Be sure to close our JMS resources!
-         if (initialContext != null)
-         {
-            initialContext.close();
-         }
          if (jmsContext != null)
          {
             jmsContext.close();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jms-context/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-context/pom.xml b/examples/jms/jms-context/pom.xml
index d586367..fac041b 100644
--- a/examples/jms/jms-context/pom.xml
+++ b/examples/jms/jms-context/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-context-example</artifactId>
+   <artifactId>context</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Context 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.JMSContextExample</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-context-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.JMSContextExample</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>context</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/jms-context/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/jms-context/readme.html b/examples/jms/jms-context/readme.html
index 253fe1b..822a474 100644
--- a/examples/jms/jms-context/readme.html
+++ b/examples/jms/jms-context/readme.html
@@ -27,67 +27,9 @@ under the License.
   <body onload="prettyPrint()">
      <h1>JMS Context 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 send and receive a message to a JMS Queue using ActiveMQ Artemis by using a JMS Context</p>
      <p>A JMSContext is part of JMS 2.0 and combines the JMS Connection and Session Objects into a simple Interface</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">
-           <code>InitialContext initialContext = getContext();</code>
-        </pre>
-
-        <li>We look-up the JMS queue object from JNDI</li>
-        <pre class="prettyprint">
-           <code>Queue queue = (Queue) initialContext.lookup("/queue/exampleQueue");</code>
-        </pre>
-
-        <li>We look-up the JMS connection factory object from JNDI</li>
-        <pre class="prettyprint">
-           <code>ConnectionFactory cf = (ConnectionFactory) initialContext.lookup("/ConnectionFactory");</code>
-        </pre>
-
-        <li>We create a JMS context</li>
-        <pre class="prettyprint">
-           <code>jmsContext = cf.createContext();</code>
-        </pre>
-
-        <li>We create a JMS Producer, set the delivery mode and send a message all in one line. Note that we don't pass
-        a message to the send method but just a String.</li>
-        <pre class="prettyprint">
-           <code>jmsContext.createProducer().setDeliveryMode(DeliveryMode.PERSISTENT).send(queue, "this is a string")</code>
-        </pre>
-
-        <li>We create a JMS message consumer and receive the payload of the message directly</li>
-        <pre class="prettyprint">
-          <code>String payLoad = jmsContext.createConsumer(queue).receiveBody(String.class);</code>
-       </pre>
-
-        <li>We create a JMS text message that we are going to send.</li>
-        <pre class="prettyprint">
-           <code>TextMessage message = session.createTextMessage("This is a text message");</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">
-           <code>finally
-           {
-              if (initialContext != null)
-              {
-                 initialContext.close();
-              }
-              if (jmsContext != null)
-              {
-                 jmsContext.close();
-              }
-           }</code>
-        </pre>
-
-
-
-     </ol>
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jms-context/src/main/java/org/apache/activemq/artemis/jms/example/JMSContextExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/jms-context/src/main/java/org/apache/activemq/artemis/jms/example/JMSContextExample.java b/examples/jms/jms-context/src/main/java/org/apache/activemq/artemis/jms/example/JMSContextExample.java
index bb8457f..27be3b0 100644
--- a/examples/jms/jms-context/src/main/java/org/apache/activemq/artemis/jms/example/JMSContextExample.java
+++ b/examples/jms/jms-context/src/main/java/org/apache/activemq/artemis/jms/example/JMSContextExample.java
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.artemis.jms.example;
 
-import javax.jms.ConnectionFactory;
 import javax.jms.DeliveryMode;
 import javax.jms.JMSContext;
 import javax.jms.Queue;
-import javax.naming.InitialContext;
-import java.lang.Exception;
+
+import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 
 /**
  * A simple JMS Queue example that creates a producer and consumer on a queue and sends then receives a message.
@@ -30,41 +30,24 @@ public class JMSContextExample
 {
    public static void main(final String[] args) throws Exception
    {
-      InitialContext initialContext = null;
-      JMSContext jmsContext = null;
-      try
+      // Instantiate the queue
+      Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
+
+      // Instantiate the ConnectionFactory (Using the default URI on this case)
+      // Also instantiate the jmsContext
+      // Using closeable interface
+      try (ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory();
+           JMSContext jmsContext = cf.createContext())
       {
-         // 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");
-
-         // Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
-
-         // Step 4.Create a JMS Context
-         jmsContext = cf.createContext();
-
-         // Step 5. Create a message producer, note that we can chain all this into one statement
+         // Create a message producer, note that we can chain all this into one statement
          jmsContext.createProducer().setDeliveryMode(DeliveryMode.PERSISTENT).send(queue, "this is a string");
 
-         // Step 6. Create a Consumer and receive the payload of the message direct.
+         // Create a Consumer and receive the payload of the message direct.
          String payLoad = jmsContext.createConsumer(queue).receiveBody(String.class);
 
          System.out.println("payLoad = " + payLoad);
+
       }
-      finally
-      {
-         // Step 7. Be sure to close our JMS resources!
-         if (initialContext != null)
-         {
-            initialContext.close();
-         }
-         if (jmsContext != null)
-         {
-            jmsContext.close();
-         }
-      }
+
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jms-context/src/main/resources/jndi.properties
----------------------------------------------------------------------
diff --git a/examples/jms/jms-context/src/main/resources/jndi.properties b/examples/jms/jms-context/src/main/resources/jndi.properties
deleted file mode 100644
index 93537c4..0000000
--- a/examples/jms/jms-context/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/jms-shared-consumer/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jms-shared-consumer/pom.xml b/examples/jms/jms-shared-consumer/pom.xml
index af55f86..c4a2b0a 100644
--- a/examples/jms/jms-shared-consumer/pom.xml
+++ b/examples/jms/jms-shared-consumer/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-shared-consumer-example</artifactId>
+   <artifactId>shared-consumer</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Shared Consumer Example</name>
 
@@ -37,71 +38,83 @@ 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.JMSSharedConsumerExample</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-shared-consumer-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>
+                     <instance>${basedir}/target/server0</instance>
+                     <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                  </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.JMSSharedConsumerExample</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>shared-consumer</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/jms-shared-consumer/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/jms-shared-consumer/readme.html b/examples/jms/jms-shared-consumer/readme.html
index 54e57f9..edf6c33 100644
--- a/examples/jms/jms-shared-consumer/readme.html
+++ b/examples/jms/jms-shared-consumer/readme.html
@@ -27,12 +27,13 @@ under the License.
   <body onload="prettyPrint()">
      <h1>JMS Shared Consumer 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 can use shared consumers to share a subscription on a topic. In JMS 1.1 this was not allowed
      and so caused a scalability issue. In JMS 2 this restriction has been lifted so you can share the load across different
          threads and connections.</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>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/jmx/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/jmx/pom.xml b/examples/jms/jmx/pom.xml
index 802025d..aaedf68 100644
--- a/examples/jms/jmx/pom.xml
+++ b/examples/jms/jmx/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-jmx-example</artifactId>
+   <artifactId>jmx</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS "JMX" Example</name>
 
@@ -46,76 +47,81 @@ under the License.
          <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>
-                           <!-- options used for JMX on the example -->
-                           <javaOptions>-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=3000 -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.JMXExample</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-jmx-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>
+                     <!-- options used for JMX on the example -->
+                     <javaOptions>-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=3000
+                        -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.JMXExample</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>jmx</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/jmx/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/jmx/readme.html b/examples/jms/jmx/readme.html
index 462ec6a..2ec87e7 100644
--- a/examples/jms/jmx/readme.html
+++ b/examples/jms/jmx/readme.html
@@ -27,6 +27,8 @@ under the License.
   <body onload="prettyPrint()">
      <h1>JMX Management 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 to manage ActiveMQ Artemis using <a href="http://java.sun.com/javase/technologies/core/mntr-mgmt/javamanagement/">JMX</a></p>
 
      <h2>Example configuration</h2>
@@ -40,12 +42,11 @@ under the License.
              -Dcom.sun.management.jmxremote.authenticate=false</code>
         </pre>
         <p>These properties are explained in the Java 5 <a href="http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html#remote">Management guide</a>
-            (please note that for this example, we will disable user authentication for simplicity sake).</p>        
-        <p>With these properties, ActiveMQ Artemis server will be manageable remotely using standard JMX URL on port <code>3000</code>.</p> 
+            (please note that for this example, we will disable user authentication for simplicity sake).</p>
+        <p>With these properties, ActiveMQ Artemis server will be manageable remotely using standard JMX URL on port <code>3000</code>.</p>
      </p>
-         
+
      <h2>Example step-by-step</h2>
-     <p><em>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</em></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 its properties from <a href="server0/client-jndi.properties">client-jndi.properties</a></li>
         <pre class="prettyprint">
@@ -66,7 +67,7 @@ under the License.
         <pre class="prettyprint">
             <code>connection = cf.createConnection();</code>
         </pre>
-        
+
         <li>We create a JMS session. The session is created as non transacted and will auto acknowledge messages.</li>
         <pre class="prettyprint">
             <code>Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);</code>
@@ -89,7 +90,7 @@ under the License.
 
         <p><em>Now that we have a message in the queue, we will manage the queue by retrieving the number of messages in the queue
             (i.e. 1) and by removing the message which has been sent in step 8.</em></p>
-            
+
         <li>We retrieve the <code>ObjectName</code> corresponding to the queue using a helper class <code>ObjectNameBuilder</code></li>
         <pre class="prettyprint">
               <code>ObjectName on = ObjectNameBuilder.DEFAULT.getJMSQueueObjectName(queue.getQueueName());</code>
@@ -104,7 +105,7 @@ under the License.
         <pre class="prettyprint">
            <code>TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);</code>
         </pre>
-        
+
         <li>We create a <code>JMSQueueControl</code> proxy to manage the queue on the server</li>
         <pre class="prettyprint">
             <code>JMSQueueControl queueControl = (JMSQueueControl)MBeanServerInvocationHandler.newProxyInstance(mbsc,
@@ -113,7 +114,7 @@ under the License.
                                                                                               false);
              </code>
         </pre>
-                
+
         <li>We use this mbean proxy to retrieve the number of messages in the queue using the <code>getMessageCount</code> method</li>
         <pre class="prettyprint">
             <code>System.out.println(queueControl.getName() + " contains " + queueControl.getMessageCount() + " messages");</code>
@@ -123,36 +124,36 @@ under the License.
         <pre class="prettyprint">
             <code>System.out.println("message has been removed: " + queueControl.removeMessage(message.getJMSMessageID()));</code>
         </pre>
-        
+
         <li>We use again the mbean proxy to retrieve the number of messages. This time, it will display <code>0</code> messages</li>
         <pre class="prettyprint">
             <code>System.out.println(queueControl.getName() + " contains " + queueControl.getMessageCount() + " messages");</code>
         </pre>
-        
+
         <li>Now we have finish the management operations, we close the JMX connector</li>
         <pre class="prettyprint">
             <code>connector.close()</code>
         </pre>
 
         <p><em>We will now try to consume the message sent to the queue but it won't be there: it has been removed by the management operation</em></p>
-        
+
         <li>We create a JMS message consumer on the queue</li>
         <pre class="prettyprint">
             <code>MessageConsumer messageConsumer = session.createConsumer(queue);</code>
         </pre>
-        
+
         <li>We start the connection. In order for delivery to occur on any consumers or subscribers on a connection, the connection must be started</li>
         <pre class="prettyprint">
             <code>connection.start();</code>
         </pre>
-        
+
         <li>We try to receive a message from the queue. Since there is none, the call will timeout after 5000ms and messageReceived will be null
         </li>
         <pre class="prettyprint">
             <code>TextMessage messageReceived = (TextMessage) messageConsumer.receive(5000);
             System.out.println("Received message: " + messageReceived);</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">
@@ -169,9 +170,9 @@ 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#management.jmx">Using Management Via JMX chapter</a></li>
         <li><a href="http://java.sun.com/j2se/1.5.0/docs/guide/management/agent.html">Java 5 Management guide</a></li>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/large-message/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/large-message/pom.xml b/examples/jms/large-message/pom.xml
index cc354e6..2382cdf 100644
--- a/examples/jms/large-message/pom.xml
+++ b/examples/jms/large-message/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-large-message-example</artifactId>
+   <artifactId>large-message</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Large Message Example</name>
 
@@ -42,50 +43,46 @@ 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>create</id>
-                        <goals>
-                           <goal>create</goal>
-                        </goals>
-                     </execution>
-                     <execution>
-                        <id>runClient</id>
-                        <goals>
-                           <goal>runClient</goal>
-                        </goals>
-                        <configuration>
-                           <clientClass>org.apache.activemq.artemis.jms.example.LargeMessageExample</clientClass>
-                           <args>
-                              <param>${basedir}/target/server0</param>
-                           </args>
-                        </configuration>
-                     </execution>
-                  </executions>
-                  <dependencies>
-                     <dependency>
-                        <groupId>org.apache.activemq.examples.jms</groupId>
-                        <artifactId>artemis-jms-large-message-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>create</id>
+                  <goals>
+                     <goal>create</goal>
+                  </goals>
+               </execution>
+               <execution>
+                  <id>runClient</id>
+                  <goals>
+                     <goal>runClient</goal>
+                  </goals>
+                  <configuration>
+                     <clientClass>org.apache.activemq.artemis.jms.example.LargeMessageExample</clientClass>
+                     <args>
+                        <param>${basedir}/target/server0</param>
+                     </args>
+                  </configuration>
+               </execution>
+            </executions>
+            <dependencies>
+               <dependency>
+                  <groupId>org.apache.activemq.examples.jms</groupId>
+                  <artifactId>large-message</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/large-message/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/large-message/readme.html b/examples/jms/large-message/readme.html
index 6f0e6f8..1583a2b 100644
--- a/examples/jms/large-message/readme.html
+++ b/examples/jms/large-message/readme.html
@@ -27,6 +27,9 @@ under the License.
   <body onload="prettyPrint()">
      <h1>Large Message Example</h1>
 
+     <pre>To run the example, simply type <b>mvn verify</b> from this directory, This example will start and stop the server since it will look for a failure.</pre>
+
+
      <p>This example shows you how to send and receive very large messages with ActiveMQ Artemis.</p>
      <p>ActiveMQ Artemis supports the sending and receiving of huge messages, much larger than can fit in available RAM
      on the client or server. Effectively the only limit to message size is the amount of disk space you have on the server.</p>
@@ -35,8 +38,7 @@ under the License.
      <p>In order to do this ActiveMQ Artemis provides an extension to JMS where you can use an InputStream or OutputStream as the source and destination for your messages. You can send messages as large as it would fit in your disk.</p>
      <p>You may also choose to read LargeMessages using the regular ByteStream or ByteMessage methods, but using the InputStream and OutputStream will provide you a much better performance</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>
+     <h2>Example step-by-step</h2>
      <p>In this example we limit both the server and the client to be running in a maximum of 50MB of RAM,
      and we send a message with a body of size 256MB.</p>
      <p>ActiveMQ Artemis can support much large message sizes but we
@@ -95,17 +97,17 @@ under the License.
         file, however we could use any InputStream not just a FileInputStream.</li>
         <pre class="prettyprint"><code>
          FileInputStream fileInputStream = new FileInputStream(fileInput);
-         
+
          BufferedInputStream bufferedInput = new BufferedInputStream(fileInputStream);
-         
+
          message.setObjectProperty("JMS_AMQ_InputStream", bufferedInput);
         </code></pre>
-        
+
         <li>Send the Message.</li>
         <pre class="prettyprint"><code>
          producer.send(message);
          </code></pre>
-        
+
 
         <li>We send message to the queue. After the send completion the message file will be located at ./build/data/largeMessages</li>
         <pre class="prettyprint">
@@ -116,7 +118,7 @@ under the License.
         To demonstrate that that we're not simply streaming the message from sending to consumer, we stop
         the server and restart it before consuming the message. This demonstrates that the large message gets persisted, like a
         normal persistent message, on the server. If you look at ./build/data/largeMessages you will see the largeMessage
-        stored on disk the server.        
+        stored on disk the server.
         </li>
           <pre class="prettyprint">
            <code>
@@ -149,7 +151,7 @@ under the License.
         MessageConsumer messageConsumer = session.createConsumer(queue);
 
         connection.start();
-           
+
            </code>
         </pre>
 
@@ -157,7 +159,7 @@ under the License.
         an empty body.</li>
         <pre class="prettyprint"><code>BytesMessage messageReceived = (BytesMessage)messageConsumer.receive(120000);
         </code></pre>
-        
+
         <li>We set an OutputStream on the message. This causes the message body to be written to the
          OutputStream until there are no more bytes to be written.
          You don't have to use a FileOutputStream, you can use any OutputStream.
@@ -169,14 +171,14 @@ under the License.
          FileOutputStream fileOutputStream = new FileOutputStream(outputFile);
 
          BufferedOutputStream bufferedOutput = new BufferedOutputStream(fileOutputStream);
-         
+
         </code></pre>
-         
-         <li>This will save the stream and wait until the entire message is written before continuing.</li> 
+
+         <li>This will save the stream and wait until the entire message is written before continuing.</li>
         <pre class="prettyprint"><code>
          messageReceived.setObjectProperty("JMS_AMQ_SaveStream", bufferedOutput);
         </code></pre>
-        
+
         <li>Be sure to close our resources!</li>
 
         <pre class="prettyprint">

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/last-value-queue/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/last-value-queue/pom.xml b/examples/jms/last-value-queue/pom.xml
index 15e9d38..6f5e89a 100644
--- a/examples/jms/last-value-queue/pom.xml
+++ b/examples/jms/last-value-queue/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-last-value-queue-example</artifactId>
+   <artifactId>last-value-queue</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Last Value Queue 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.LastValueQueueExample</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-last-value-queue-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.LastValueQueueExample</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>last-value-queue</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/last-value-queue/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/last-value-queue/readme.html b/examples/jms/last-value-queue/readme.html
index 303c136..1ecb6e8 100644
--- a/examples/jms/last-value-queue/readme.html
+++ b/examples/jms/last-value-queue/readme.html
@@ -27,25 +27,26 @@ under the License.
   <body onload="prettyPrint()">
      <h1>Last-Value Queue 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 last-value queues.</p>
      <p>Last-Value queues are special queues which discard any messages when a newer message with the same value for a well-defined <em>Last-Value</em> property is put in the queue.
          In other words, a Last-Value queue only retains the last value.</p>
      <p>A typical example for Last-Value queue is for stock prices, where you are only interested by the latest value for a particular stock.</p>
-         
+
      <p>The example will send 3 messages with the same <em>Last-Value</em> property to a to a Last-Value queue.<br />
         We will browse the queue and see that only the last message is in the queue, the first two messages have been discarded. <br />
         We will then consume from the queue the <em>last</em> message.</p>
-        
+
      <h2>Example setup</h2>
      <p>Last-Value queues are defined in the configuration file <a href="server0/broker.xml">broker.xml</a>:</p>
      <pre class="prettyprint">
          <code>&lt;address-setting match="jms.queue.lastValueQueue"&gt;
                 &lt;last-value-queue&gt;true&lt;/last-value-queue&gt;
          &lt;/address-setting&gt;</code>
-     </pre>          
-     
+     </pre>
+
      <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 <a href="server0/client-jndi.properties">client-jndi.properties</a></li>
         <pre class="prettyprint">
@@ -68,7 +69,7 @@ under the License.
             Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
             MessageProducer producer = session.createProducer(queue);</code>
        </pre>
-       
+
        <li>We will create and send a text message with the Last-Value property set to <code>STOCK_NAME</code></li>
        <pre class="prettyprint">
            <code>TextMessage message = session.createTextMessage("1st message with Last-Value property set");
@@ -76,7 +77,7 @@ under the License.
            producer.send(message);
            System.out.format("Sent message: %s\n", message.getText());</code>
        </pre>
-       
+
        <p><em>The <em>Last-Value</em> key is defined in ActiveMQ's MessageImpl class. Its value is <code>"_AMQ_LVQ_NAME"</code></em></p>
 
        <li>We will create and send a <em>second</em> text message with the Last-Value property set to <code>STOCK_NAME</code></li>
@@ -111,14 +112,14 @@ under the License.
             browser.close();
             </code>
         </pre>
-        
+
         <p><em>We will now consume the message on the queue</em></p>
 
         <li>We create a JMS message consumer on the queue</li>
         <pre class="prettyprint">
             <code>MessageConsumer messageConsumer = session.createConsumer(queue);</code>
         </pre>
-        
+
         <li>We start the connection. In order for delivery to occur on any consumers or subscribers on a connection, the connection must be started</li>
         <pre class="prettyprint">
            <code>connection.start();</code>
@@ -129,7 +130,7 @@ under the License.
            <code> TextMessage messageReceived = (TextMessage)messageConsumer.receive(5000);
             System.out.format("Received message: %s\n", messageReceived.getText());</code>
         </pre>
-        
+
         <li>We will try to receive another message but there is no other on the queue. The <code>receive</code> method will timeout after 5 seconds</li>
         <pre class="prettyprint">
            <code> messageReceived = (TextMessage)messageConsumer.receive(5000);
@@ -151,9 +152,9 @@ 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#last-value-queues">Last-Value Queues chapter</a></li>
      </ul>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/last-value-queue/src/main/java/org/apache/activemq/artemis/jms/example/LastValueQueueExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/last-value-queue/src/main/java/org/apache/activemq/artemis/jms/example/LastValueQueueExample.java b/examples/jms/last-value-queue/src/main/java/org/apache/activemq/artemis/jms/example/LastValueQueueExample.java
index 72b001b..2c37503 100644
--- a/examples/jms/last-value-queue/src/main/java/org/apache/activemq/artemis/jms/example/LastValueQueueExample.java
+++ b/examples/jms/last-value-queue/src/main/java/org/apache/activemq/artemis/jms/example/LastValueQueueExample.java
@@ -16,17 +16,17 @@
  */
 package org.apache.activemq.artemis.jms.example;
 
-import java.util.Enumeration;
-
 import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Queue;
 import javax.jms.QueueBrowser;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import javax.naming.InitialContext;
+import java.util.Enumeration;
+
+import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
 
 /**
  * This example shows how to configure and use a <em>Last-Value</em> queues.
@@ -37,17 +37,13 @@ public class LastValueQueueExample
    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. new Queue
+         Queue queue = ActiveMQJMSClient.createQueue("exampleQueue");
 
-         // Step 2. Perfom a lookup on the queue
-         Queue queue = (Queue)initialContext.lookup("queue/exampleQueue");
-
-         // Step 3. Perform a lookup on the Connection Factory
-         ConnectionFactory cf = (ConnectionFactory)initialContext.lookup("ConnectionFactory");
+         // Step 3. new Connection Factory
+         ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory();
 
          // Step 4.Create a JMS Connection, session and producer on the queue
          connection = cf.createConnection();
@@ -99,15 +95,11 @@ public class LastValueQueueExample
          messageReceived = (TextMessage)messageConsumer.receive(5000);
          System.out.format("Received message: %s%n", messageReceived);
 
-         initialContext.close();
+         cf.close();
       }
       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/management-notifications/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/management-notifications/pom.xml b/examples/jms/management-notifications/pom.xml
index 8caa70f..a9adba3 100644
--- a/examples/jms/management-notifications/pom.xml
+++ b/examples/jms/management-notifications/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-management-notifications-example</artifactId>
+   <artifactId>management-notifications</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Management Notifications 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.ManagementNotificationExample</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-management-notifications-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.ManagementNotificationExample</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>management-notifications</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/management-notifications/readme.html
----------------------------------------------------------------------
diff --git a/examples/jms/management-notifications/readme.html b/examples/jms/management-notifications/readme.html
index 20406cb..6a76f62 100644
--- a/examples/jms/management-notifications/readme.html
+++ b/examples/jms/management-notifications/readme.html
@@ -26,6 +26,9 @@ under the License.
   </head>
   <body onload="prettyPrint()">
      <h1>Management Notification 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 to receive management notifications from ActiveMQ Artemis using JMS Messages.</p>
      <p>ActiveMQ Artemis servers emit management notifications when events of interest occur (consumers are created or closed,
          destinations are created or deleted, security authentication fails, etc.).<br />
@@ -33,7 +36,7 @@ under the License.
          from a well-known destination.</p>
      <p>This example will setup a JMS MessageListener to receive management notifications. We will also perform normal JMS operations to see the kind
          of notifications they trigger.</p>
-     
+
      <h2>Example configuration</h2>
 
      <p>ActiveMQ Artemis can configured to send JMS messages when management notifications are emitted on the server.</p>
@@ -42,7 +45,7 @@ under the License.
       <pre class="prettyprint">
          <code>&lt;management-notification-address&gt;jms.topic.notificationsTopic&lt;/management-notification-address&gt;</code>
      </pre>
-     
+
      <p>Since we want to lookup the notifications topic using JNDI, we also declare it in  <a href="server0/activemq-jms.xml">activemq-jms.xml</a>
      <pre class="prettyprint">
          <code>&lt;topic name="notificationsTopic"&gt;
@@ -59,10 +62,9 @@ under the License.
             &lt;permission type="deleteNonDurableQueue" roles="guest"/&gt;
          &lt;/security-setting&gt;</code>
      </pre>
-     
+
      <h2>Example step-by-step</h2>
-     <p><em>To run the example, simply type <code>mvn verify -Pexample</code> from this directory</em></p>
-     <ol>
+x     <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 its properties from <a href="server0/client-jndi.properties">client-jndi.properties</a></li>
         <pre class="prettyprint">
             <code>InitialContext initialContext = getContext(0);</code>
@@ -84,7 +86,7 @@ under the License.
             Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
             MessageProducer producer = session.createProducer(queue);</code>
         </pre>
-        
+
         <li>We look up the JMS Topic used to receive the notifications from JNDI</li>
         <pre class="prettyprint">
             <code>Topic notificationsTopic = (Topic) initialContext.lookup("/topic/notificationsTopic");</code>
@@ -112,23 +114,23 @@ under the License.
                  {
                  }
                  System.out.println("------------------------");
-              }            
+              }
            });</code>
         </pre>
-        
+
         <li>We start the connection to receive messages</li>
         <pre class="prettyprint">
             <code>connection.start();</code>
         </pre>
-        
-        <p><em>Now that a message listener is setup to receive management notifications, we will perform regular JMS operations to 
+
+        <p><em>Now that a message listener is setup to receive management notifications, we will perform regular JMS operations to
             see what kind of notifications are triggered</em></p>
-            
+
         <li>We create a JMS message consumer on the example queue</li>
         <pre class="prettyprint">
             <code>MessageConsumer consumer = session.createConsumer(queue);</code>
         </pre>
-        
+
         <p>This will generate a <code>CONSUMER_CREATED</code> notification:
         <pre class="prettyprint">
             <code>------------------------
@@ -143,7 +145,7 @@ under the License.
         </pre>
         <p>The notification tells us that a consumer was created for the JMS queue <code>exampleQueue</code>. When the notification
             was emitted, this consumer was the only one for the queue</p>
-            
+
         <li>We close this consumer</li>
         <pre class="prettyprint">
             <code>consumer.close();</code>
@@ -170,10 +172,10 @@ under the License.
             {
                cf.createConnection("not.a.valid.user", "not.a.valid.password");
             } catch (JMSException e)
-            {            
+            {
             }</code>
         </pre>
-        
+
         <p>This will generate a <code>SECURITY_AUTHENTICATION_VIOLATION</code> notification:
         <pre class="prettyprint">
             <code>------------------------
@@ -185,7 +187,7 @@ under the License.
             </code>
         </pre>
         <p>The notification tells us that a user named <code>not.a.valid.user</code> failed to authenticate when creating a connection to ActiveMQ Artemis.</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">
@@ -202,12 +204,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#management.notifications">Management Notifications chapter</a></li>
-     </ul>         
+     </ul>
 
   </body>
 </html>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd820318/examples/jms/management/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/management/pom.xml b/examples/jms/management/pom.xml
index d287c28..b84b8f5 100644
--- a/examples/jms/management/pom.xml
+++ b/examples/jms/management/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-management-example</artifactId>
+   <artifactId>management</artifactId>
    <packaging>jar</packaging>
    <name>ActiveMQ Artemis JMS Management Example</name>
 
@@ -41,72 +42,77 @@ under the License.
          <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>
-                     </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.ManagementExample</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-management-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.ManagementExample</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>management</artifactId>
+                  <version>${project.version}</version>
+               </dependency>
+            </dependencies>
+         </plugin>
+      </plugins>
+   </build>
 
 </project>


Mime
View raw message