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/07/29 23:22:21 UTC

[15/24] activemq-artemis git commit: ARTEMIS-178 Refactor examples to use CLI

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ScaleDownExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ScaleDownExample.java b/examples/jms/scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ScaleDownExample.java
index 5ee9701..f370491 100644
--- a/examples/jms/scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ScaleDownExample.java
+++ b/examples/jms/scale-down/src/main/java/org/apache/activemq/artemis/jms/example/ScaleDownExample.java
@@ -16,8 +16,6 @@
  */
 package org.apache.activemq.artemis.jms.example;
 
-import java.util.Hashtable;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.MessageConsumer;
@@ -26,6 +24,7 @@ import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.naming.InitialContext;
+import java.util.Hashtable;
 
 import org.apache.activemq.artemis.common.example.ActiveMQExample;
 
@@ -56,13 +55,13 @@ public class ScaleDownExample extends ActiveMQExample
          // Step 1. Get an initial context for looking up JNDI for both servers
          Hashtable<String, Object> properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
-         properties.put("connectionFactory.ConnectionFactory", args[0] + "?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
+         properties.put("connectionFactory.ConnectionFactory", DEFAULT_TCP1 + "?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
          properties.put("queue.queue/exampleQueue", "exampleQueue");
          initialContext = new InitialContext(properties);
 
          properties = new Hashtable<String, Object>();
          properties.put("java.naming.factory.initial", "org.apache.activemq.artemis.jndi.ActiveMQInitialContextFactory");
-         properties.put("connectionFactory.ConnectionFactory", args[1] + "?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
+         properties.put("connectionFactory.ConnectionFactory", DEFAULT_TCP2 + "?ha=true&retryInterval=1000&retryIntervalMultiplier=1.0&reconnectAttempts=-1");
          initialContext1 = new InitialContext(properties);
 
          // Step 2. Look up the JMS resources from JNDI
@@ -97,6 +96,7 @@ public class ScaleDownExample extends ActiveMQExample
          // it has really crashed
          Thread.sleep(5000);
          killServer(1);
+         Thread.sleep(5000);
 
 
          // Step 8. start the connection ready to receive messages

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/scale-down/src/main/resources/activemq/server0/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/activemq/server0/broker.xml b/examples/jms/scale-down/src/main/resources/activemq/server0/broker.xml
index 33de64f..b2e1887 100644
--- a/examples/jms/scale-down/src/main/resources/activemq/server0/broker.xml
+++ b/examples/jms/scale-down/src/main/resources/activemq/server0/broker.xml
@@ -30,13 +30,13 @@ under the License.
    <core xmlns="urn:activemq:core">
 
 
-      <bindings-directory>target/server0/data/messaging/bindings</bindings-directory>
+      <bindings-directory>${data.dir:../data}/bindings</bindings-directory>
 
-      <journal-directory>target/server0/data/messaging/journal</journal-directory>
+      <journal-directory>${data.dir:../data}/journal</journal-directory>
 
-      <large-messages-directory>target/server0/data/messaging/largemessages</large-messages-directory>
+      <large-messages-directory>${data.dir:../data}/largemessages</large-messages-directory>
 
-      <paging-directory>target/server0/data/messaging/paging</paging-directory>
+      <paging-directory>${data.dir:../data}/paging</paging-directory>
       <!-- Connectors -->
 
       <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/scale-down/src/main/resources/activemq/server1/broker.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scale-down/src/main/resources/activemq/server1/broker.xml b/examples/jms/scale-down/src/main/resources/activemq/server1/broker.xml
index 7602ef9..e198399 100644
--- a/examples/jms/scale-down/src/main/resources/activemq/server1/broker.xml
+++ b/examples/jms/scale-down/src/main/resources/activemq/server1/broker.xml
@@ -30,13 +30,13 @@ under the License.
    <core xmlns="urn:activemq:core">
 
 
-      <bindings-directory>target/server1/data/messaging/bindings</bindings-directory>
+      <bindings-directory>${data.dir:../data}/bindings</bindings-directory>
 
-      <journal-directory>target/server1/data/messaging/journal</journal-directory>
+      <journal-directory>${data.dir:../data}/journal</journal-directory>
 
-      <large-messages-directory>target/server1/data/messaging/largemessages</large-messages-directory>
+      <large-messages-directory>${data.dir:../data}/largemessages</large-messages-directory>
 
-      <paging-directory>target/server1/data/messaging/paging</paging-directory>
+      <paging-directory>${data.dir:../data}/paging</paging-directory>
 
       <!-- Connectors -->
       <connectors>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/scheduled-message/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/scheduled-message/pom.xml b/examples/jms/scheduled-message/pom.xml
index cbd96ff..676e557 100644
--- a/examples/jms/scheduled-message/pom.xml
+++ b/examples/jms/scheduled-message/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -77,14 +73,11 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.ScheduledMessageExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -92,41 +85,7 @@ under the License.
                         <artifactId>artemis-jms-scheduled-message-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/security/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/security/pom.xml b/examples/jms/security/pom.xml
index 66388a5..88330b1 100644
--- a/examples/jms/security/pom.xml
+++ b/examples/jms/security/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -77,14 +73,11 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.SecurityExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -92,41 +85,7 @@ under the License.
                         <artifactId>artemis-jms-security-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/send-acknowledgements/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/send-acknowledgements/pom.xml b/examples/jms/send-acknowledgements/pom.xml
index 165e9a9..7aa59cf 100644
--- a/examples/jms/send-acknowledgements/pom.xml
+++ b/examples/jms/send-acknowledgements/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -77,14 +73,11 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.SendAcknowledgementsExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -92,41 +85,7 @@ under the License.
                         <artifactId>artemis-jms-send-acknowledgements-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/spring-integration/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/spring-integration/pom.xml b/examples/jms/spring-integration/pom.xml
index b021c57..25ae488 100644
--- a/examples/jms/spring-integration/pom.xml
+++ b/examples/jms/spring-integration/pom.xml
@@ -72,6 +72,9 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.SpringExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
                   </executions>
@@ -81,41 +84,7 @@ under the License.
                         <artifactId>artemis-jms-spring-integration-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/ssl-enabled/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/ssl-enabled/pom.xml b/examples/jms/ssl-enabled/pom.xml
index 4c80eba..47989bf 100644
--- a/examples/jms/ssl-enabled/pom.xml
+++ b/examples/jms/ssl-enabled/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -77,14 +73,11 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.SSLExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -92,41 +85,7 @@ under the License.
                         <artifactId>artemis-jms-ssl-enabled-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/static-selector-jms/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector-jms/pom.xml b/examples/jms/static-selector-jms/pom.xml
index 5e2855d..750af00 100644
--- a/examples/jms/static-selector-jms/pom.xml
+++ b/examples/jms/static-selector-jms/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -78,16 +74,10 @@ under the License.
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.StaticSelectorJMSExample</clientClass>
                            <args>
-                              <param>tcp://localhost:61616</param>
+                              <param>${basedir}/target/server0</param>
                            </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -95,41 +85,7 @@ under the License.
                         <artifactId>artemis-jms-static-selector-jms-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/static-selector/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/static-selector/pom.xml b/examples/jms/static-selector/pom.xml
index 19f8e80..cf08771 100644
--- a/examples/jms/static-selector/pom.xml
+++ b/examples/jms/static-selector/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -77,14 +73,11 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.StaticSelectorExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -92,41 +85,7 @@ under the License.
                         <artifactId>artemis-static-selector-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/stomp-websockets/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp-websockets/pom.xml b/examples/jms/stomp-websockets/pom.xml
index 49710ca..d64b66d 100644
--- a/examples/jms/stomp-websockets/pom.xml
+++ b/examples/jms/stomp-websockets/pom.xml
@@ -57,12 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start0</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -73,23 +74,8 @@ under the License.
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.StompWebSocketExample</clientClass>
                            <args>
-                              <param>tcp://localhost:61616</param>
+                              <param>${basedir}/target/server0</param>
                            </args>
-                           <systemProperties>
-                              <property>
-                                 <name>exampleConfigDir</name>
-                                 <value>${basedir}/target/classes/activemq</value>
-                              </property>
-                           </systemProperties>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop0</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                        <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
                         </configuration>
                      </execution>
                   </executions>
@@ -99,51 +85,7 @@ under the License.
                         <artifactId>artemis-jms-stomp-websockets-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-stomp-protocol</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <systemProperties>
-                        <property>
-                           <name>data.dir</name>
-                           <value>${basedir}/target/</value>
-                        </property>
-                     </systemProperties>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/stomp/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp/pom.xml b/examples/jms/stomp/pom.xml
index d7276f5..809e433 100644
--- a/examples/jms/stomp/pom.xml
+++ b/examples/jms/stomp/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -77,14 +73,11 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.StompExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -92,46 +85,7 @@ under the License.
                         <artifactId>artemis-jms-stomp-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-stomp-protocol</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/stomp1.1/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.1/pom.xml b/examples/jms/stomp1.1/pom.xml
index 0ac5dbd..14e9a76 100644
--- a/examples/jms/stomp1.1/pom.xml
+++ b/examples/jms/stomp1.1/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -77,14 +73,11 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.StompExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -92,46 +85,7 @@ under the License.
                         <artifactId>artemis-jms-stomp1.1-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-stomp-protocol</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/stomp1.2/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stomp1.2/pom.xml b/examples/jms/stomp1.2/pom.xml
index c2f8b36..c696d8b 100644
--- a/examples/jms/stomp1.2/pom.xml
+++ b/examples/jms/stomp1.2/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -77,14 +73,11 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.StompExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -92,46 +85,7 @@ under the License.
                         <artifactId>artemis-jms-stomp1.2-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-stomp-protocol</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/stop-server-failover/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/stop-server-failover/pom.xml b/examples/jms/stop-server-failover/pom.xml
index 04033af..e1ebe90 100644
--- a/examples/jms/stop-server-failover/pom.xml
+++ b/examples/jms/stop-server-failover/pom.xml
@@ -57,42 +57,25 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start0</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                              <property>
-                                 <name>udp-address</name>
-                                 <value>${udp-address}</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                           <javaOptions>-Dudp-address=${udp-address}</javaOptions>
                         </configuration>
                      </execution>
                      <execution>
-                        <id>start1</id>
+                        <id>create2</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
-                           <fork>true</fork>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                              <property>
-                                 <name>udp-address</name>
-                                 <value>${udp-address}</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server1</instance>
+                           <configuration>${basedir}/target/classes/activemq/server1</configuration>
+                           <javaOptions>-Dudp-address=${udp-address}</javaOptions>
                         </configuration>
                      </execution>
                      <execution>
@@ -103,33 +86,9 @@ under the License.
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.StopServerFailoverExample</clientClass>
                            <args>
-                              <param>tcp://localhost:61616</param>
-                              <param>tcp://localhost:61617</param>
+                              <param>${basedir}/target/server0</param>
+                              <param>${basedir}/target/server1</param>
                            </args>
-                           <systemProperties>
-                              <property>
-                                 <name>exampleConfigDir</name>
-                                 <value>${basedir}/target/classes/activemq</value>
-                              </property>
-                           </systemProperties>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop0</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                        <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop1</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                        <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
                         </configuration>
                      </execution>
                   </executions>
@@ -139,46 +98,7 @@ under the License.
                         <artifactId>artemis-jms-stop-server-failover-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <systemProperties>
-                        <property>
-                           <name>data.dir</name>
-                           <value>${basedir}/target/</value>
-                        </property>
-                     </systemProperties>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/symmetric-cluster/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/pom.xml b/examples/jms/symmetric-cluster/pom.xml
index 6da292c..a7d35f7 100644
--- a/examples/jms/symmetric-cluster/pom.xml
+++ b/examples/jms/symmetric-cluster/pom.xml
@@ -57,124 +57,72 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start0</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                              <property>
-                                 <name>udp-address</name>
-                                 <value>${udp-address}</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
+                           <javaOptions>-Dudp-address=${udp-address}</javaOptions>
                         </configuration>
                      </execution>
                      <execution>
-                        <id>start1</id>
+                        <id>create1</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
-                           <fork>true</fork>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                              <property>
-                                 <name>udp-address</name>
-                                 <value>${udp-address}</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server1</instance>
+                           <configuration>${basedir}/target/classes/activemq/server1</configuration>
+                           <javaOptions>-Dudp-address=${udp-address}</javaOptions>
                         </configuration>
                      </execution>
                      <execution>
-                        <id>start2</id>
+                        <id>create2</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server2</configurationDir>
-                           <fork>true</fork>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                              <property>
-                                 <name>udp-address</name>
-                                 <value>${udp-address}</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server2</instance>
+                           <configuration>${basedir}/target/classes/activemq/server2</configuration>
+                           <javaOptions>-Dudp-address=${udp-address}</javaOptions>
                         </configuration>
                      </execution>
                      <execution>
-                        <id>start3</id>
+                        <id>create3</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server3</configurationDir>
-                           <fork>true</fork>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                              <property>
-                                 <name>udp-address</name>
-                                 <value>${udp-address}</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server3</instance>
+                           <configuration>${basedir}/target/classes/activemq/server3</configuration>
+                           <javaOptions>-Dudp-address=${udp-address}</javaOptions>
                         </configuration>
                      </execution>
                      <execution>
-                        <id>start4</id>
+                        <id>create4</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server4</configurationDir>
-                           <fork>true</fork>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                              <property>
-                                 <name>udp-address</name>
-                                 <value>${udp-address}</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server4</instance>
+                           <configuration>${basedir}/target/classes/activemq/server4</configuration>
+                           <javaOptions>-Dudp-address=${udp-address}</javaOptions>
                         </configuration>
                      </execution>
                      <execution>
-                        <id>start5</id>
+                        <id>create5</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server5</configurationDir>
-                           <fork>true</fork>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                              <property>
-                                 <name>udp-address</name>
-                                 <value>${udp-address}</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server5</instance>
+                           <configuration>${basedir}/target/classes/activemq/server5</configuration>
+                           <javaOptions>-Dudp-address=${udp-address}</javaOptions>
                         </configuration>
                      </execution>
+
                      <execution>
                         <id>runClient</id>
                         <goals>
@@ -183,73 +131,13 @@ under the License.
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.SymmetricClusterExample</clientClass>
                            <args>
-                              <param>tcp://localhost:61616</param>
-                              <param>tcp://localhost:61617</param>
-                              <param>tcp://localhost:61618</param>
-                              <param>tcp://localhost:61619</param>
-                              <param>tcp://localhost:61620</param>
-                              <param>tcp://localhost:5450</param>
+                              <param>${basedir}/target/server0</param>
+                              <param>${basedir}/target/server1</param>
+                              <param>${basedir}/target/server2</param>
+                              <param>${basedir}/target/server3</param>
+                              <param>${basedir}/target/server4</param>
+                              <param>${basedir}/target/server5</param>
                            </args>
-                           <systemProperties>
-                              <property>
-                                 <name>exampleConfigDir</name>
-                                 <value>${basedir}/target/classes/activemq</value>
-                              </property>
-                           </systemProperties>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop0</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                        <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop1</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                        <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server1</configurationDir>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop2</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                        <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server2</configurationDir>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop3</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                        <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server3</configurationDir>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop4</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                        <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server4</configurationDir>
-                        </configuration>
-                     </execution>
-                     <execution>
-                        <id>stop5</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                        <configuration>
-                           <configurationDir>${basedir}/target/classes/activemq/server5</configurationDir>
                         </configuration>
                      </execution>
                   </executions>
@@ -259,46 +147,7 @@ under the License.
                         <artifactId>artemis-jms-symmetric-cluster-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <systemProperties>
-                        <property>
-                           <name>data.dir</name>
-                           <value>${basedir}/target/</value>
-                        </property>
-                     </systemProperties>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/artemis/jms/example/SymmetricClusterExample.java
----------------------------------------------------------------------
diff --git a/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/artemis/jms/example/SymmetricClusterExample.java b/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/artemis/jms/example/SymmetricClusterExample.java
index c17c5cd..24e75f0 100644
--- a/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/artemis/jms/example/SymmetricClusterExample.java
+++ b/examples/jms/symmetric-cluster/src/main/java/org/apache/activemq/artemis/jms/example/SymmetricClusterExample.java
@@ -232,12 +232,12 @@ public class SymmetricClusterExample extends ActiveMQExample
       {
          // Step 15. Be sure to close our resources!
 
-         closeConnection(connection0);
-         closeConnection(connection1);
-         closeConnection(connection2);
-         closeConnection(connection3);
-         closeConnection(connection4);
-         closeConnection(connection5);
+         connection0.close();
+         connection1.close();
+         connection2.close();
+         connection3.close();
+         connection4.close();
+         connection5.close();
       }
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/temp-queue/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/temp-queue/pom.xml b/examples/jms/temp-queue/pom.xml
index 6f47781..b213088 100644
--- a/examples/jms/temp-queue/pom.xml
+++ b/examples/jms/temp-queue/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -77,14 +73,11 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.TemporaryQueueExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -92,41 +85,7 @@ under the License.
                         <artifactId>artemis-jms-temp-queue-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b3af4bb7/examples/jms/topic-hierarchies/pom.xml
----------------------------------------------------------------------
diff --git a/examples/jms/topic-hierarchies/pom.xml b/examples/jms/topic-hierarchies/pom.xml
index 388f63f..087570e 100644
--- a/examples/jms/topic-hierarchies/pom.xml
+++ b/examples/jms/topic-hierarchies/pom.xml
@@ -57,17 +57,13 @@ under the License.
                   <artifactId>artemis-maven-plugin</artifactId>
                   <executions>
                      <execution>
-                        <id>start</id>
+                        <id>create</id>
                         <goals>
-                           <goal>start</goal>
+                           <goal>create</goal>
                         </goals>
                         <configuration>
-                           <systemProperties>
-                              <property>
-                                 <name>data.dir</name>
-                                 <value>${basedir}/target/</value>
-                              </property>
-                           </systemProperties>
+                           <instance>${basedir}/target/server0</instance>
+                           <configuration>${basedir}/target/classes/activemq/server0</configuration>
                         </configuration>
                      </execution>
                      <execution>
@@ -77,14 +73,11 @@ under the License.
                         </goals>
                         <configuration>
                            <clientClass>org.apache.activemq.artemis.jms.example.TopicHierarchyExample</clientClass>
+                           <args>
+                              <param>${basedir}/target/server0</param>
+                           </args>
                         </configuration>
                      </execution>
-                     <execution>
-                        <id>stop</id>
-                        <goals>
-                           <goal>stop</goal>
-                        </goals>
-                     </execution>
                   </executions>
                   <dependencies>
                      <dependency>
@@ -92,41 +85,7 @@ under the License.
                         <artifactId>artemis-jms-topic-hierarchies-example</artifactId>
                         <version>${project.version}</version>
                      </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-core-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-client</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.activemq</groupId>
-                        <artifactId>artemis-jms-server</artifactId>
-                        <version>${project.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>io.netty</groupId>
-                        <artifactId>netty-all</artifactId>
-                        <version>${netty.version}</version>
-                     </dependency>
-                     <dependency>
-                        <groupId>org.apache.geronimo.specs</groupId>
-                        <artifactId>geronimo-jms_2.0_spec</artifactId>
-                        <version>${geronimo.jms.2.spec.version}</version>
-                     </dependency>
                   </dependencies>
-                  <configuration>
-                     <waitOnStart>false</waitOnStart>
-                     <configurationDir>${basedir}/target/classes/activemq/server0</configurationDir>
-                  </configuration>
                </plugin>
             </plugins>
          </build>